BISMARCK, N.D. — Smaller Powerball jackpots during the last fiscal year led to a 22 percent decrease in North Dakota lottery ticket sales though gambling activity was still the third highest in state history, the state’s lottery directory said.

North Dakota gamblers wagered $27.6 million on lottery games for the fiscal year that ended June 30, down from a record $35.7 million in fiscal 2016, lottery director Randy Miller told The Associated Press.

The numbers are still being audited and the final figures could change slightly, he said.

Jackpots affect ticket sales and the record $1.5 billion Powerball jackpot in 2016 spurred a record number of sales that year, Miller said.

“We just didn’t have the record jackpot last year like we did the year before,” he said.

Still, last year’s ticket sales were only $200,000 short of the second-highest on record set in fiscal 2013, he said.

North Dakota’s lottery profits last fiscal year were $6.2 million, down from $9.5 million the year before.

The lottery offers four multistate games — Powerball and Mega Millions, in which the odds of winning are minute and the jackpots potentially massive, and 2by2 and Lucky For Life, which have smaller payouts but better odds.

Powerball has been the state’s most popular lottery game since it was launched in 2004, following a successful initiative campaign to lift the North Dakota Constitution’s lottery ban.

Most lottery profits go to the state’s general treasury, with smaller portions set aside to provide counseling for gambling addicts and for drug enforcement.

The lottery has transferred $320,000 to a compulsive gambling program in each of the past two years, and $422,500 each year to drug enforcement.

Data show lottery prizes from all games dropped from $18.3 million in fiscal 2016 to $14.4 million last year. The lottery’s overall expenses dropped from $26 million to $20.8 million during that time, due to a decrease in ticket sales, Miller said.

Aside from prize payouts, the lottery’s biggest cost was $2.88 million in commissions paid to Scientific Games International Inc., which supplies and services the lottery’s sales terminals. The Georgia company takes a commission of about 10 cents for every lottery ticket sold, he said.

The lottery also paid $1.38 million to the 450 North Dakota merchants who sell tickets. The businesses get a nickel commission for every dollar ticket they sell.

While ticket sales and revenue were down, salaries and benefits for the agency’s eight full-time and two part-time employees increased from $830,172 in fiscal 2016 to $887,569 last year, data show.

Miller said North Dakota players didn’t cash $734,280 worth of winning tickets in fiscal 2017, up from $449,431 the year before and well above the long-term average of about $402,781. Gamblers have to cash a winning lottery ticket within six months, or the money goes to the state.

Unclaimed winnings from the past two fiscal years already have been transferred to the state treasury, Miller said.

The total last year includes a $25,000 Mega Millions ticket that the buyer didn’t claim, he said.