A farmer learned the hard way today that while an Englishman's home may be his castle, even if it is hidden behind giant bales of straw, it will still need planning permission.

Robert Fidler, who built his mock Tudor castle, hiding it during construction and for some time afterwards behind straw bales and a tarpaulin, yesterday lost a high court battle to prevent its demolition.

Fidler, 61, built the luxury four-bedroom property, complete with ramparts, turrets and cannon, over two years, and then lived in it with his wife and son.

He hoped to sidestep the planning system by applying for a certificate of lawfulness, sometimes applicable if no one objects to a newly-built property for four years after construction. He kept the property secret from 2002, when it was finished, until 2006.

Asked why he had built a castle, Fidler said he had wanted to convert a cowshed into a home, but was told the building could only be used for industrial purposes. "They say an Englishman is entitled to have his castle. I thought that maybe I could claim this to be my castle, and see if there was any mileage in that," he said. "It was part of the dream of being able to build and own your own house."

But Reigate and Banstead council failed to share Fidler's romantic ideal and issued an enforcement notice in March 2007 requiring the castle's demolition on grounds he had erected it without planning permission.

Today, deputy high court judge Sir Thayne Forbes, sitting in London, ruled that Fidler could not benefit from his deception of the local planning authority.

Fidler, from Honeycrock farm, Redhill, Surrey, has been fighting to prevent the destruction of his fairytale home and to try for planning permission again. He and his wife, Linda, 40, and their nine-year-old son, Harry, moved into the house, built on their farmland for £50,000, living a secret life in an attempt to avoid having to apply for planning permission. The couple went to great lengths to ensure their home, which includes two redundant grain silos transformed into towers, remained undiscovered, finally revealing the development in August 2006.

The council argued that the four-year period was void because no one had been able to see the building and the house was not completed until Fidler had taken down the straw screen. The judge agreed and upheld the enforcement notice.

The Fidler home, which has a grand hall with a stained-glass "lantern feature", may yet survive. After the ruling Fidler vowed to take the case to the appeal court, and, if unsuccessful, on to the European court of human rights. "This house will never be knocked down. This is a beautiful house that has been lovingly created. I will do whatever it takes to keep it," he said.

Mike Miller, a Reigate councillor res­ponsible for planning, transport and housing, said Fidler would be required to demolish the house within 12 months. "This was a blatant attempt at deception to circumvent the planning process, which particularly in the green belt is an important part of ­trying to protect the environment we live in," he said.