(CNN) A Michigan lottery winner must share the $38 million windfall with his ex-wife, even though they were in the process of divorcing when he bought the ticket.

to an opinion issued last week by the Michigan Court of Appeals. Richard Zelasko won an $80 million Mega Millions jackpot in July 2013 -- after taxes and fees his prize was $38,873,628, accordingto an opinion issued last week by the Michigan Court of Appeals.

The suburban Detroit man and his then-wife, Mary Elizabeth Zelasko, filed for divorce in late 2011. The case had gone to arbitration, and they were waiting for the arbitrator's opinion when Richard Zelasko won the prize.

The couple were married in 2004 and have three children.

The arbitrator ruled that the ticket was part of the couple's marital assets and awarded $15 million to the wife and divided the rest of their assets, according to the opinion. He said that the "marital property includes all property acquired from the date of marriage until the date of entry of the divorce decree," including property acquired during a separation.

Read More