Mobile phone texting
A man has been jailed for inundating his ex-girlfriend with tens of thousands of phone calls and texts Getty Images

A jilted French man has been jailed after barraging his ex-girlfriend with 21,807 phone calls and texts demanding she thank him for fixing their flat.

The unnamed defendant was given a 10-month sentence, six months of which was suspended, and a €1,000 (£793) fine and ordered to undergo psychiatric treatment.

The Lyon court also barred him from contacting his ex, a 32-year-old teacher, who he called on average 73 times a day over a ten-month period, after the victim called off the relationship.

The defendant, of Rhone, south France, had suffered bouts of depression since their separation and earlier accepted orders to not contact the women, AFP reported.

He claimed he would have stopped harassing the woman if she only returned money he believed she owed him or simply said thank you for his work.

"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.

"She tried to block her line, but he phoned her parents instead and her workplace," said the victim's lawyer.

The bombardment finally ended when the victim thanked him during a meeting organised by a mediator and he has not contacted her since.

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