RICHMOND, Va. (WJHL) — Tens of millions of dollars will go to Virginia public schools thanks to recent Mega Millions lottery ticket sales.

The Virginia Lottery announced that sales of Mega Millions tickets over the past few weeks generated an estimated $31.1 million in profits, all of which will go to K–12 education per state law.

Just over 194,000 tickets were purchased in Virginia ahead of the Aug. 8 Mega Millions drawing, which featured a record-high jackpot of $1.58 billion.

The winning ticket was sold in Florida.

The jackpot for the Friday Mega Millions drawing will reset to $20 million, according to the Virginia Lottery.