AUGUSTA — A sheriff’s deputy was legally justified in shooting into the car of a man who tried to ram his cruiser after setting fire to his estranged wife’s home, the state attorney general said Thursday.

A report indicated Androscoggin County sheriff’s deputy Dennis Sampson fired three times after Michael Callahan tried to ram his cruiser. The deputy had been told Callahan, who had let loose with 90 gunshots in a standoff months earlier, might be armed.

The episode unfolded May 24 when Callahan was reported to have set fire to his estranged wife’s home in Minot and to his own home. Then Callahan rammed the woman’s vehicle repeatedly before Sampson pursued him, police said.

Sampson told investigators that he followed Callahan’s damaged pickup truck until it stopped and backed up, forcing him to reverse to avoid a collision. Sampson’s cruiser ended up going down and embankment into a ditch, where he could see the truck rocking as if someone were moving around in the cab.

Sampson, a 23-year veteran police officer, fired three times but missed.

Attorney General Janet Mills said Sampson was legally justified is using lethal force because he thought he was in imminent danger. No one was hurt in the incident.

Callahan is awaiting trial on charges of domestic violence, reckless conduct, aggravated assault, reckless conduct and violating the conditions of bail and a protection order. His lawyer was out of the office Thursday and didn’t immediately return a message seeking comment.