Lottery computer programmer to reveal how he rigged results to win millions in prizemoney. iStock

A lottery computer programmer will tell investigators how he was able to use his position to rig US state jackpots for years and he and his brother will repay $3 million (£2.3 million) in prizes they improperly claimed, under a plea agreement released Monday.

Prosecutors will seek a 25-year prison sentence for former Multi-State Lottery Association security director Eddie Tipton, the mastermind of a scheme that rocked the lottery industry. His brother, former Texas judge Tommy Tipton, is expected to face 75 days in jail.

Wisconsin prosecutors released the agreement Monday after Eddie Tipton pleaded guilty to theft and computer crime charges in Madison. The plea was a surprise for Tipton, who had insisted on his innocence for 2 ½ years and was facing a trial in Iowa next month. The agreement calls for Tipton to soon plead guilty to ongoing criminal conduct in Iowa, and to confess to a civil judgement in Kansas.

"Mr. Tipton's actions defrauding the lottery were a gross violation of the public's trust and confidence," said Wisconsin Attorney General Brad Schimel, praising investigators for "their efforts to find truth and seek justice."

In his job at the Urbandale, Iowa-based association, Tipton wrote and installed code for software that picked random numbers for games sold by its member lotteries. Investigators say Tipton designed his code so that on three days of the year, he could predict winning numbers in some games. The Tiptons and friend Robert Rhodes bought winning numbers for drawings in Colorado, Wisconsin, Iowa, Kansas and Oklahoma between 2005 and 2011. Other associates were involved but haven't faced charges.

The conspiracy unraveled after Tipton was caught on surveillance video buying a winning $16.5 million ticket in December 2010 in Iowa that he, Rhodes and others unsuccessfully tried to claim.

The Tiptons will tell investigators "all facts related, directly or indirectly, to their actions to fix, win, and claim lottery jackpots." They won't face any additional charges based on their testimony but will cooperate with any additional legal actions related to rigged jackpots.

"There's a lot of value in confirming what we believe we know," said Iowa prosecutor Rob Sand, adding that the brothers' cooperation "is going to be helpful to lotteries around the country."

Tipton and his attorneys declined comment. They'll be free to seek a lesser sentence than the 25-year term Iowa prosecutors will seek.

Tommy Tipton's attorney, Mark Weinhardt, said his client was pleased to reach a "sensible resolution" in which he'll serve 75 days after pleading to a misdemeanor.

"Tommy takes full responsibility for his role in this affair," he said. "This agreement will allow Tommy to continue to be the hard-working citizen and loving father to his children that he has been for many years."

The brothers will repay $3 million to Colorado, Oklahoma, Wisconsin and Kansas.

Rhodes, of Sugar Land, Texas, earlier pleaded guilty, agreeing to repay Wisconsin his share of a 2007 jackpot and to testify against his former best friend. Rhodes had described how the two worked together to claim and split the $783,000 Megabucks prize in Wisconsin.

Rhodes told investigators he visited Tipton at his Iowa home in 2007. Tipton gave him index cards containing a series of numbers for him to play for the 29 Dec drawing — one of the calendar days when Tipton could predict winning combinations. Rhodes drove around Wisconsin in a rental car, buying tickets from various stores before using a limited liability company to claim the prize.

The investigation started with a mystery in 2011. A newly created trust stepped forward hours before a one-year deadline to claim a $16.5 million jackpot. But it refused to tell the Iowa Lottery who purchased the ticket. Iowa declined to pay and launched a criminal investigation.

Investigators got a break in 2014 after releasing video of a man buying hot dogs and the winning ticket at a Des Moines gas station. Colleagues told police the man looked and sounded just like Tipton, who had access to lottery computers. He was convicted of fraud related to that ticket after a 2015 trial, where Tommy Tipton insisted that couldn't have been his brother on the video.

Investigators then looked into whether Tipton had rigged other games after receiving a tip that his brother won a 2005 Colorado lottery. Wisconsin investigators recovered an old computer from the 2007 drawing, and a forensic analysis revealed how Tipton's code worked.

The association, which fired Tipton after his arrest, faces lawsuits by players who claim they were cheated by Tipton's rigging.