A builder who spotted an opportunity and took over a long-empty home has won his squatters’ rights - even though he committed a criminal trespass by staying there.

In a case which will come as bad news for private homeowners, Keith Best fought to be recognised as lawful owner of 35 Church Road.

Appeal Court judges last week ruled that his “adverse possession” rights were unaffected by the criminalisation of squatting in 2012.

Mr Best was doing some work on a nearby property in 1997 when he heard that the owner of empty and heavily vandalised number 35 had died.

The house was registered in the name of Doris May Curtis, but Mr Best entered the property and carried out extensive renovation works.

Those included repairing the roof, putting in new ceilings and electrics and much plastering and painting.

He moved into the property in January 2012 and, in November the same year, applied to be officially registered as owner, claiming he had “treated the house as his own since 2001.”

However, in September 2012, the Legal Aid, Sentencing and Punishment of Offenders Act 2012 (LASPOA) - which for the first time criminalised squatting - came into force.

And the Chief Land Registrar refused to register Mr Best, saying that he had been committing a criminal offence for two months before he made his application.

In a landmark decision today, Lord Justice Sales ruled that the Registrar got the law wrong and that the criminalisation of trespass did not effect Mr Best’s rights.

The judge, sitting with Lady Justice Arden and Lord Justice McCombe, acknowledged the fundamental principle that “rights should not be derived from criminal acts”.

However, against that, was the public interest in ensuring that long-vacant homes are returned to use and that those who had “long been in undisputed possession” of private property should be entitled to treat it as their own.

The decision means the Land Registry must now reconsider Mr Best’s application to be formally recognised as the owner.