The Powerball jackpot is up to $700 million, the second highest it has ever been, and late Wednesday millions of Americans will be tuning in to the televised drawing to see if they have the lucky numbers.

But legalized lotteries are a relatively new phenomenon in the United States.

Early colonists operated lotteries, and Roger Dunstan, who wrote the book History of Gambling in the United States, said the Jamestown colonists operated lotteries to fund the colony.

Screen display the lottery prizes, as store clark Malik Imran serves customer, Tuesday, Aug. 22, 2017, in Chicago. Officials estimated jackpot for Wednesday night’s Powerball lottery game has climbed to $700 million, making it the second largest in U.S. history. (AP Photo/G-Jun Yam)

But the Massachusetts Bay Colony, founded by Puritans, banned lotteries and other forms of gambling, even at home.

In the end, the lure of easy money was too much and eventually, each of the 13 original colonies operated lotteries to provide funding.

A billboard advertising the Powerball jackpot stands in Bellevue, Neb., Wednesday, Aug. 23, 2017. Lottery officials said the grand prize for Wednesday night’s drawing has reached $700 million. The second -largest on record for any U.S. lottery game. (AP Photo/Nati Harnik)

Money from lotteries was used to fund schools and infrastructure, which is similar to what the revenues are used for today.

But it wasn’t smooth sailing for state lotteries.  As scandals and evangelical disapproval of gambling mounted, states began banning lotteries as early as 1844.  By 1890, only Delaware and Louisiana had lotteries.

The pendulum started to swing back when Puerto Rico instituted a lottery in 1934.  Thirty years later, New Hampshire followed suit.

Now, nearly every state, with the exception of Alaska, Hawaii, Mississippi, Nevada, Utah and Alabama, have state lotteries.

Today, most of the big-prize lotteries are operated across many states.  Powerball and Mega Millions are the biggest joint-state lotteries.  They are both available in 44 states.

Atul Amin, left, sells a customer a Powerball ticket at his news stand in Philadelphia, Tuesday, Aug. 22, 2017. (AP Photo/Matt Rourke)

According to Reuters, lotteries raised $17.6 billion in 2009.  Eleven states made more money off the lottery than they did from corporate income tax, Reuters said.  Most of the revenue goes to public schools

Lottery officials said they expect to sell more than 170 million tickets for Wednesday’s drawing.  If there are no winners, the next jackpot, on Saturday, could top $1 billion.

The odds of winning the top prize are 1-in-292-million.