A widower who tried to avoid a clause in his wife’s will stating he must not remarry after her death has had to forfeit the inheritance she left him.

The provincial court in Galicia, Spain, heard that the man, named only as Constantino, insisted that his long-term relationship with the other woman, who he claimed was his cousin, did not equate to a marriage. However, the court ruled that he had lived with her for nearly three decades in a relationship that was comparable to a marriage.

Constantino’s wife died in 1996 but had made her will in 1975; at a time when it was not uncommon in Spain for people to leave their wealth to their spouses provided that they did not remarry, The Times reports.

The court was told that Constantino had begun his affair with the other woman in the late 1980s, with the relationship lasting until her death in 2016. The case against him was brought by his wife’s sister, claiming he had not adhered to the terms of the will.

While witnesses presented by the man agreed that he had spent long periods at the woman’s house, they stated that this was purely down to a close family bond that existed between the two cousins.

However, the court decided this family link could not be proved, instead concluding the relationship was “affectionate and of conjugal appearance, with a habitual and stable character”.

It added that Constantino had committed “a fraud against the true will of the testator” and ordered him to return all the assets of the estate.

Details of exactly what those assets are have not been released.