OWLS HEAD, Maine — A state judge has sided with the town in a lawsuit filed by the owner of a commercial garage who claimed his building was destroyed by fire in 2013 because of the Fire Department’s inadequate response.

Justice William Stokes in a ruling issued Thursday stated that the town, its volunteer Fire Department and Chief Frank Ross have immunity from the lawsuit filed in February 2015 by Cecil A. Fogg, and his company, Cecil A. Fogg Inc.

Fogg had sought more than $400,000 in damages for the fire that occurred on Feb. 10, 2013, at Frankie’s Garage on Route 73 in Owls Head.

“I think that this was the only result that state law allows,” the town’s attorney, Edward Benjamin Jr. of Portland, said Friday.

He said most municipalities in Maine depend heavily on volunteer firefighters to help neighbors in times of emergencies. He said if people who lose property in fires are allowed to drag municipalities through costly litigation whenever they feel a fire should have been fought differently, or better, than it was, the municipalities’ response might well be not to provide the service at all.

The attorney said that without immunity there would be “endless Monday morning quarterbacking before the embers even cooled.”

He said the allegation by Fogg that Ross let the building burn to settle some grudge concerning a 1996 car crash was not only absurd but an insult to all the firefighters who arrived and fought the fire for hours but were unable to save an old building filled with flammable products. Fogg had claimed that Ross said to him as the garage burned that this was “for the accident.”

The fire began in an oil waste furnace.

Fogg rebuilt the garage. In addition to the building, Fogg lost equipment and classic cars and motorcycles.

Fogg claimed in his lawsuit Ross arrived and went inside the building without his firefighting gear to look at the blaze and that when he left, Ross left the door open, which allowed the fire to spread faster. The chief also did not have the proper equipment to hook up hoses to the nearest fire hydrant and he refused to use spray foam or set up a dunk tank to battle the blaze, Fogg had maintained.

Email messages were left late Friday for Fogg’s attorneys, Patrick Mellor and Darby Urey of Rockland. A telephone message also was left for Fogg late Friday afternoon at his garage.