While New Yorkers flocked to buy Powerball tickets ahead of Saturday’s drawing for a record $900 million jackpot, a ticket bought on Staten Island won the $165 million Mega Millions prize Friday night.

According to the New York State Lottery Commission, the winning Mega Millions ticket was sold at deli 2520 Foodmart Corp., 2520 Victory Blvd., Staten Island.

The winner’s identity was not disclosed, but the six winning numbers were 11, 39, 51, 57, 75 plus the gold Mega ball of 2.

The jackpot is valued at $101 million in cash.

Two winners in Maryland and Texas claimed smaller prizes, worth about $1 million each.

The jackpot has been growing since Nov. 13, when Lucky Duck Passive Trust, of Columbus, Ohio, claimed a $202 million jackpot, according to Mega Millions officials.

Officials said more than 20 million other smaller prizes have been won since then — including 22 worth at least $1 million — though no one matched enough numbers to win the jackpot until Friday.

advertisement | advertise on newsday

New Yorkers with Powerball fever will have to wait until 10:59 p.m. to find out if they’ll be as lucky. The cutoff time to buy tickets for that drawing is 10 p.m.