PHOENIX — Facing growing unemployment, record home foreclosures, declining tax revenue and an annual budget deficit that reached $3 billion, Arizona revamped a key money-making enterprise: the state lottery.

It held focus groups, introduced new games, printed fancier tickets, recruited new retailers, increased jackpots, plunged into social media and upped its advertising budget by almost 50 percent. The gamble paid off: Ticket sales rose 14 percent from fiscal 2009 to 2010 — the largest increase in the country, according to Rockville, Md.-based lottery research firm La Fleur’s. In the 12 months that ended June 30, sales were up almost 6 percent more to a record $584 million.

“Especially during a recessionary period, players were looking for a reason to play the game,” said Jeff Hatch-Miller, 66, executive director of the Arizona Lottery in an interview at his Phoenix office. “What we saw was people were pulling back on their expenditures unless they had some value-added propositions.”

Arizona is not alone in bidding for more lottery dollars. After total lottery income nationwide fell for the first time in more than a decade in 2009, states redoubled their efforts to attract more players to support educational and environmental programs and help fill the gap from slumping tax revenue.

Even as unemployment remained high and the economy dragged, players in many states responded. Of the 43 states with lotteries, 26 saw revenue grow in traditional games in the last fiscal year, with total sales up 3 percent to $56 billion, according to La Fleur’s. Ticket sales in at least 17 of those states set records, according to data compiled by Bloomberg, and several states are on track to hit all-time highs this year.

Many states are considering expanded gambling as well. Massachusetts Gov. Deval Patrick signed legislation Nov. 22 authorizing as many as three resort casinos in his state, while officials in Georgia and Florida are weighing similar proposals. While interstate gambling online is barred by federal law, Washington, D.C., and other jurisdictions are looking at launching Internet poker within their boundaries.

At least 28 states have considered lottery or gaming-related bills since 2010 to close budget gaps, according to data from the Washington-based National Conference of State Legislatures.

Overall, states got an average 2.4 percent of revenue from lotteries and other forms of gambling in 2009, according to a report last year from the Albany, New York-based Nelson A. Rockefeller Institute of Government.

While efforts to expand casinos or legalize other forms of gaming get the most attention, lotteries are still the primary source of government gambling revenue for states, the report notes. Across the country, state lotteries are rebranding, adding games, recruiting new retailers and moving online to attract new players.

In Tennessee, some lawmakers are calling for the lottery to accept credit and debit cards for purchases that now require cash. A bill in New Jersey would allow tickets to be sold on the Internet or via smartphones. And several states including Ohio and Arizona are looking at following the lead of Illinois, which in March became the first lottery in the nation to turn over management, marketing and sales to a private company to seek higher returns.

“You have politicians not wanting to raise taxes right now, so lotteries are good ways to raise money,” said David G. Schwartz, director of the Center for Gaming Research at the University of Nevada, Las Vegas.

California is poised to have its best year of lottery sales ever after a 2010 law signed by then-governor Arnold Schwarzenegger allowed bigger prize payouts, spurring interest in the games and supporting higher-priced tickets.

Sales increased 13 percent in the year that ended June 30 — the second-highest growth rate in the country behind Arkansas, where the lottery was in its first full year of operation. At the California Lottery, the popularity of a new $10 “Scratchers” ticket introduced last month is expected to push sales this year above $4 billion, said Alex Traverso, a spokesman.

“This is shaping up to be a record year,” he said.