A Vancouver architect thought he was doing something nice for his kids when he built them a fancy treehouse.

However, Andrew Dewberry didn't count on an annoyed neighbour or the city's bureaucracy siding with her, and now finds himself in a fight over the structure.

The treehouse is shaped like a pirate ship. Dewberry spent almost $3,000 building it in his front yard. His sons Jack and Sam love their hideaway in the cedars.

Some neighbours in the exclusive neighbourhood of Kerrisdale applaud Dewberry's creation.

"I think it's a fantastic place. I wish I had something like that when I was a kid. It's really something good," said Norm Randall.

However, his immediate neighbour Janice McShane complains that the structure impedes her view.

"The Dewberrys have clearly crossed the line and defied the bylaws that the city created so we could all live together and enjoy our properties," she said.

Dewberry said the place where he built the treehouse is the only place it could be built safely.

"I have compromised on my design. I have mitigated it against my neighbour's complaints," he said.

He insists he called the city first and got the go-ahead.

"It didn't seem as if it could have been much clearer. A tree fort is a tree fort: it's a temporary piece of playground equipment," Dewberry said.

However, a bylaw officer decided the house was a building like a shed, and required a building permit.

The city then denied Dewberry a permit but he refused to dismantle the treehouse. The city is now taking the Dewberrys to court.

If the Dewberrys lose, they'll be out the treehouse, the money spent to build it and could face a $2,000 fine.

"Obviously I'm going to try to appeal on the basis of common sense. Common sense says this is just equipment for kids to play," Dewberry said.

A court date will be set at the end of August.

With a report from CTV's Todd Battis