A married man who died of a heart attack after having sex on a business trip in France was ruled to have been the victim of a workplace accident — making his company financially responsible, according to reports.

Engineer Xavier X was found dead in his hotel room in Meung-sur-Loire shortly after having sex with a local woman he’d just met, according to the Times of London.

Lawyers for his bosses at the Parisian railroad construction company TSO insisted he was not performing duties when he had the heart attack — blaming the “adulterous sex act that he had had with a complete stranger,” according to the report.

But appeals court judges ruled that an employee on assignment “is entitled to their employer’s protection for the duration of their mission … whether or not the accident takes place as part of a professional activity or as an act of normal life,” the report said.

They held up a 2016 lower court ruling in the case that stated, “A sexual encounter is an act of normal life like taking a shower or eating a meal,” according to the Times.

That means the February 2013 death of Xavier X, whose surname was not released, is officially an “accident du travail,” which entitles the victim’s family to benefits from both the state and employer.

Any partners and children will receive a monthly benefit of up to 80 percent of his salary until what would have been his retirement age and then a share of his pension.

Xavier’s employer fought the decision but lost at all stages, the outlet reported.