The European Union’s top court has backed British second home owners in the so-called “guerre du tax” with France, by deeming it “illegal” to force them to pay social charges on gains from renting or selling their properties.

In 2012 the socialist government of President François Hollande imposed a 15.5% “social charge” on capital gains from the sale of second homes or rental income on them. Some 200,000 non-resident British property owners in France, along with thousands of others from the European Union, were affected by the measures, which the French government said would bring in €250million a year.

Tax on rental income suddenly rose from 20% to 35.5%, while capital gains tax on property sales rose from 19% to 34.5%.

The Court of Justice has said the tax contravenes EU law which states that a resident of a member state must contribute to the social security system of just one member state.The ruling by the European Court of Justice means that French authorities are liable to reimburse tens of millions of euros to British and other EU non-resident owners who have let out or sold their properties in the past two to three years.