A lottery ticket buyer in Minnesota came oh so close to hitting a Mega Millions jackpot topping $500 million, but still has a $1 million consolation prize to claim.

The Mega Millions game has finally produced a jackpot winner for the first time in more than 11 weeks. One ticket, sold in California, matched all six numbers drawn Tuesday — the white balls 1, 2, 4, 19 and 29, plus the gold Mega Ball 20 — good for $522 million. Taking all the loot at once makes the payout $308.1 million. Then, of course, there are the tax consequences.

The ticket for the fifth-largest jackpot in Mega Millions history was bought at Ernie’s Liquors in San Jose. The purchaser has yet to step forward.

The Minnesota ticket worth $1 million was sold in Plymouth at the Kwik Trip at 1605 Annapolis Lane. The store will receive a $5,000 bonus when the prize is claimed.

This is the ninth $1 million Mega Millions prize won in Minnesota since sales began in February 2010.

The holder of the winning ticket should sign the back of the ticket and call the Minnesota Lottery at 651-635-8273 to make arrangements to claim the prize.