Updated

A French judge sentenced a jilted lover to ten months in prison for calling and texting his ex-girlfriend 21,807 times in less than a year.

The unidentified defendant, 33, harassed the woman by phone about 73 times a day for 10 months, because he wanted her to thank him for fixing up their apartment, French news agency AFP reported.

The judge suspended six months of the 10-month sentence and issued a 1,000 Euro fine (about $1300). The defendant was also ordered to undergo psychiatric treatment and has been blocked from all contact with his ex-girlfriend, lawyers in the case told AFP.

The man had been hospitalized for depression in the past, and was having trouble recovering from the 2011 breakup with his girlfriend. He demanded compensation for work he had done in their apartment.

"At the time, my logic was that until she returns the money … or at least says thank you, I would not stop the calls," he told the court in Lyon.

"She tried to block her line, but he phoned her parents instead and her workplace," Manuella Spee, the victim’s attorney said. Calls and texts persisted — up to 100 a day, Spee told Radio France.

When the woman filed charges, "police noted over 100 incoming calls during the 90 minutes it took to file charges," Spee said.

The harassment stopped after the victim — a 32-year-old unidentified teacher — finally thanked him at a meeting arranged by a mediator. He has not contacted her since.

"I tell myself, with hindsight, that it was stupid," the defendant told the court Thursday.

The victim,"suffered a lot" said Spee, but since "has enjoyed a fantastic summer time, with no phone calls, and hopes it will last."