VALLEY STREAM, N.Y. (PIX11) — A Long Island lotto ticket beat long odds in Friday’s Mega Millions drawing, matching enough numbers to net $4 million.

The lucky ticket was sold at Mahavir Convenience on West Merrick Road in Valley Stream, according to lottery officials.

Though it missed the gold Mega Ball number of 11, the ticket matched all five white ball numbers drawn: 8, 25, 36, 39, and 67.

Because the player chose to shell out for the optional Megaplier — which multiplies non-jackpot prizes by a separate drawn number, in Friday’s case four — the typical $1 million prize for matching the five white balls was quadrupled to $4 million. The odds of matching the five white balls are 1 in 12,607,306.

The object of Mega Millions is to match five white ball numbers drawn from a field of one through 70, plus the gold Mega Ball drawn from a field of one through 25. Had the ticket also matched the gold Mega Ball, it would have been good for the estimated annuitized jackpot of $167 million.

Mega Millions costs $2 per play, or $3 with the optional Megaplier add-on. The odds of winning the jackpot are 1 in 302,575,350. Drawings are held Tuesdays and Fridays at 11 p.m.