We should all be so unlucky.

An Illinois man is thankful for a broken lottery machine that recently led him to purchase a ticket for the wrong lottery game. He wound up winning a cool $9.2-million prize.

“It was a normal day, just like any other,” the man, who has chosen to remain anonymous, told Illinois Lottery officials, per people.com.

“I was picking up groceries at Jewel and on my way out the door, I decided to buy a lottery ticket,” he said.

The man “wanted to buy a ticket for a different game” but the “machine got stuck on Lotto.”

Frustration followed.

“I was a bit frustrated. I said, ‘What is going on? The machine won’t give me the right game!’” he said.

Ultimately, the man opted to just go with it and buy the lotto ticket.

The winning numbers for the Aug. 24 draw ended up being 2-15-21-29-42-44 — and the man matched all six numbers to win the massive prize.

“The morning after the drawing, I scanned the ticket at a machine to check if it was a winner. When the machine showed the $9.2-million prize amount, I couldn’t believe it!,” the winner told lottery officials.

“I looked at my wife, and she was completely speechless,” he added. “We are laughing over how angry I was at the broken machine – and we’re so grateful for how it all turned out.”

This win marks the second-largest Lotto prize won this year in the state.

Recommended video