APPLETON, Maine — A judge has fined an Appleton man $1,000 and ordered him to pay the town $3,000 for its legal costs for the lengthy dispute over the construction of a house that ultimately had to be removed.

Justice William Stokes issued his ruling Wednesday in the land-use case filed by Appleton against Appleton Ridge Construction.

Appleton Ridge owner Jacob Boyington declined comment Thursday on the ruling. Barring an appeal to the Maine Supreme Judicial Court, this ruling ends the seven-year legal battle.

Justice Stokes pointed out that Boyington had been made aware of the appeals filed by neighbors for the building permit of the house but decided to continue with construction.

“The defendant assumed the risk that the permits would be rescinded by court order, as they ultimately were,” Stokes ruled. “Not only did the defendant assume the financial risk of proceeding with construction, it also assumed the risk that the building would be found in violation of the town’s ordinances.”

The town incurred a total of $10,204 in attorneys fees, but the judge deducted certain expenses from that amount, such as the town fighting to prevent the neighbors from intervening in the land-use complaint case.

The judge also noted that the litigation took longer because the town Select Board was unable to reach a quorum during several points of decision making on the case. The chairman of the board recused himself because Boyington is his nephew, and another selectman abstained from voting because of a connection with a tenant in the house.

Last July, Boyington moved the two-story house from his property because the structure was found by a Knox County court justice to have been erected in violation of town zoning laws.

Specifically, the 24-by-32-foot building was not far enough from the road, and Boyington could not reposition it anywhere on the 0.18-acre lot to satisfy the zoning requirements. He had been granted a permit by the town, but the court ruled the permit was issued in error.

Code Enforcement Officer C. Toupie Rooney had testified Tuesday that Boyington was cooperative with her after the land-use complaint was filed and that he updated her on his efforts to find a solution to the matter. Boyington was required to move the house by Jan. 20, 2015, and it was moved July 30 of that year. The town and state law call for fines of $100 to $2,500 per day of a violation.

Boyington purchased the tax-acquired lot from the town in 2009. He received a building permit that neighbors later appealed, saying the building was too close to the town right of way. He said he continued to build the house while the appeal was ongoing but said Bob Temple, who was the code officer at the time, repeatedly assured him the property could be built on.