How’s this for alimony? A Michigan man who won more than $30 million playing the lottery while separated from his wife has been ordered to give her nearly half the money as part of their divorce settlement.

Rich Zelasko of Pontiac had been split from his wife Mary Beth for about two years when he won the big Mega Millions prize in 2013.

But an arbitrator ruled the winnings were marital property and should be shared, the Detroit Free Press reported.

WOMAN WHO WON $1.5 BILLION MEGA MILLIONS JACKPOT CAN KEEP IDENTITY SECRET; WILL DONATE TO CHARITY

The husband’s lawyer had argued against dividing the money.

"Rich was lucky, but it was his luck, not Mary's, that produced the lottery proceeds,” the lawyer said, according to a court filing cited by the Free Press.

After taxes and deductions, the lottery player was left with just short of $39 million, court records said, according to Tribune Media. The arbitrator decided that Zelasko’s wife should get $15 million, the report said.

CLICK HERE TO GET THE FOX NEWS APP

An appeals court upheld the arbitrator’s decision, according to reports.

The former couple’s divorce was finalized in 2018. Court documents showed they were married in 2004 and have three children.