A half-million dollar house that was accidentally built on the wrong lot in Hawaii and then trashed by squatters must be demolished, a judge ordered, and the construction company that made the mistake has to pay for it.

The judge also dismissed a countersuit the developer filed against the land's true owner, SFGATE reported.

Annaleine Reynolds bought a vacant, one-acre lot in Hawaiian Paradise Park on the Big Island for around $22,500 at a county tax auction in 2018. Reynolds lives in California, but planned to eventually move and start hosting meditative healing women's retreats on the property.

But last year, she got a call from a real estate broker informing her that a three-bedroom house had been built and then sold on her property. A listing for the house that was later removed priced it at $499,000. The mistake was only uncovered when the broker ran a title check on the property during closing, which nullified the sale. 

'OH MY GOD': SINGLE MOM RETURNS HOME FROM WORK TO FIND DRIVEWAY STOLEN. 'NOW I'M LEFT WITH DIRT'

home for sale with sign in front

Last year, Annaleine Reynolds learned that a house had been built on a vacant lot she owned in Hawaii. The developer suggested swapping lots with her, then filed a countersuit against Reynolds when she rejected the offer. (iStock)

"I felt like I wanted to cry," Reynolds told SFGATE earlier this year. "There is this house on my land, and it’s not mine."

The building blunder began when Keaau Development Partnership LLC hired PJ's Construction to erect around a dozen homes in a subdivision of the Big Island's Puna district, the Associated Press reported. But according to the ruling, they didn't have a survey done before starting construction.

Instead, the project's contractor testified that he counted the lots using telephone poles, and then built the house on the wrong side of the pole.

Taxes skyrocketed from $400 a year on the property to $4,000 after the house was built, local media reported.

‘CHRISTMAS LAWYER’ EYES SUPREME COURT REVIEW IN BATTLE WITH HOA OVER HOLIDAY LIGHT SHOW

judge gavel

Judge Robert Kim ruled that the construction company will foot the bill for a new contractor to demolish the house mistakenly built on Reynolds' property. Kim also dismissed a counterclaim filed against Reynolds by the developer that accused her of exploiting the situation for her own gain. (iStock)

Adding insult to injury, when Reynolds visited the house in February, she found the doors unlocked and evidence of squatters inside.

"There was poop on the floor, in the hallway bathroom and on the toilet seat," she told the New York Post. "I was shocked."

The developer offered up a swap of a neighboring property to resolve the dispute, but Reynolds rejected the proposition, arguing she felt a spiritual connection to the land she'd purchased.

'I WANT MY HOUSE BACK': WASHINGTON HOMEOWNER LIVES IN VAN WHILE DEADBEAT TENANT LISTS HOUSE ON AIRBNB

So KDP filed a counterclaim against Reynolds, accusing her of trying to exploit the construction company's mistake and gain "unjust enrichment."

"The appreciation in the value of her property constitutes a legal benefit to her, and that retention of all that benefit would be unjust because my client spent $300,000 for the construction and Ms. Reynolds got a free house," Peter Olson, an attorney representing the developer, previously told Fox News Digital.

WATCH: HOMEOWNER LIVES IN VAN AS DEADBEAT TENANT LISTS HOUSE ON AIRBNB:

Judge Robert Kim tossed out that claim in late June. He also ruled that a new contractor should tear down the unwanted structures and send the bill to PJ's, the Hawaii Tribune-Herald reported.

"The clear motivation of KDP and PJC was to cut corners to reduce construction costs," reads part of the ruling.

CLICK HERE TO GET THE FOX NEWS APP 

Kim denied Reynolds' request to restore the property to its pre-development state, ruling that would be impossible. But he did grant her attorney's fees and costs. Reynolds could also seek additional damages.

Attorneys for Reynolds and the developer did not immediately respond to a request for comment Monday.