Pol Lt Charoon Wimool (left) was declared the rightful owner of a winning set of 30-million-baht lottery tickets on Tuesday. (Photo by Piyaratch Chongcharoen)

A retired police officer, not a teacher, has been declared the owner of a winning set of lottery tickets in a case that dragged on for 18 months.

The Kanchanaburi Court on Tuesday finally handed down the ruling in a drama that grabbed media headlines due to the 30 million baht prize at stake.

The court ruled that there was no credible evidence showing teacher Preecha Kraikruan was at Red City market in Muang district of Kanchanaburi on Oct 30, 2017, the day that Pol Lt Charoon Wimool bought his lottery tickets.

The tickets won the top prize of 30 million baht in the Nov 1, 2017 draw.

Mr Preecha, who taught at Thepmongkol Rangsee School until he was temporarily suspended over the controversy, claimed in a lawsuit filed with the court after the draw that he was the real owner, and sued Pol Lt Charoon for alleged embezzlement and receipt of stolen goods.

But the evidence the teacher presented to the court did not sway the judges, who ruled they were not convinced that he was at the market when the tickets were sold.

The lottery tickets were seized pending the judicial process.

Teacher Preecha Kraikruan (centre) lost a lawsuit against a retired police officer in a ruling on Tuesday. (Photo by Piyaratch Chongcharoen)

"I have been waiting for this day," Pol Lt Charoon said after listening to the court decision.

Sittra Biabungkerd, a lawyer for Pol Lt Charoon, thanked the court for the ruling and said he will seek its permission to return the tickets to his client.

Mr Sittra said the retired officer plans a civil lawsuit against his rival for damages and said he was ready if Mr Preecha appeals the ruling.

"The court dismissed the lawsuit!! We won," the lawyer posted in a Facebook message.

Mr Preecha said he respected the ruling and his lawyer, Worayuth Boonwongsai, said his client will appeal the ruling.

The court will later release the 70-page ruling.

Both Pol Lt Charoon and Mr Preecha previously told the media they expected to win the court fight.

"I want the truth to be told and the wrongdoer punished," the teacher said on Dec 20, 2018 after the court accepted his lawsuit.

Pol Lt Charoon said on the same day that he was not worried about the allegations.