It seems to have worked. Thanks in part to the introduction of the ticket, the Massachusetts Lottery achieved a record $4.7 billion in sales for the 12 months ended June 30, compared with $4.4 billion for the year before, and sales have continued to rise in the two months since the end of the fiscal year.

Drawing those casino players to the lotteries has been crucial. Though experts say casino gambling and lotteries have both been historically recession-proof, high gasoline and food prices have contributed to a revenue decline experienced this year by gambling destinations including Las Vegas and Atlantic City. (Atlantic City did record a slight rise in August.)

“The lotteries are on every street corner, and you do have to travel a bit to get to a casino as a general rule,” said John Kindt, a professor of business administration at the University of Illinois who has studied lotteries. “The accessibility of the lotteries is a plus for them. They’re in everybody’s backyard.”

The higher sales of the current economic downturn have generally drawn higher net revenue along with them, in continuation of a longer trend. A study issued in June by the Rockefeller Institute of Government, a research arm of the State University of New York, found that lottery revenue had grown steadily over the last 10 years, with the highest growth rates during the nation’s last recession, in 2001-2.

Increased lottery returns do little to offset declines in larger sources of revenue, like sales and income taxes, that have forced some states to impose hiring freezes, layoffs and wage reductions during the current downturn. “If your personal income tax is weak or sales tax is weak, the lottery isn’t enough to make up for that,” said Scott D. Pattison, executive director of the National Association of State Budget Officers. “But any revenue that is doing well, or at least not too bad, certainly helps.”

Somewhat incongruously, there is a thought that the hard times contributing to the lottery sales boom may well bring about its demise: if the economic slump continues, or even deepens, the thinking goes, many players may at last have had enough.

No one can know, of course, whether that reversal will be fully realized. But a survey of regular players by Independent Lottery Research, a consulting firm based in Chicago, found last month that 20 percent of them were already playing less or buying less expensive tickets.