A man in Maine stole a police cruiser on Monday before crashing, exchanging gunfire with police and stealing another police vehicle in a chase that created a chaotic scene in a rural area, police said.

Gary Porter, 37, who is unhoused, had been arrested for an outstanding felony theft warrant, according to the Maine Department of Public Safety. 

Porter was then transported from Stephen’s Memorial Hospital, where he was treated for conditions unrelated to that arrest, to Oxford County Jail by Paris Police Chief Mike Dailey.

“While attempting to remove Porter from the vehicle at the jail Porter was able to slip his cuffs from the back to the front and move to the driver’s seat and steal the Paris police cruiser,” Department of Public Safety spokesperson Shannon Moss stated, adding that Dailey “was thrown from the moving vehicle while attempting to stop Porter.”

Porter then allegedly crashed on Route 117 in Paris, police said.

Officers confronted Porter and gunfire was exchanged, police said. Porter was struck but allegedly fled the scene and stole an Oxford County Sheriff's Office police vehicle, which he crashed up the road, police said. 

Porter "was taken into custody and treated at a local hospital," police said. It was unclear on Monday if the man had retained a lawyer.

Porter is charged with two counts of theft, assault on a police officer, escape, eluding, and violating bail.

There were multiple reports of road closures in the area. A motorist captured video of the man in handcuffs appearing to steal the police cruiser Monday amid the exchange of gunfire.

The man was dressed in white, possibly in a hospital robe, when he fled from a vehicle that had crashed in a ditch, said Linda Marie Mercer, who encountered police vehicles blocking the road and began filming the scene with her cellphone.

Mercer said there were two volleys of gunfire — one when the suspect was inside the vehicle, and again when he drove away.

"The door of the truck was open most of the time. You could see him. They kept telling him to put his hands up," she said. "Then all of a sudden, he stands up, runs right out of the ditch, and climbs right into the police vehicle."

Mercer, a mobile notary public, said she continued to an appointment after the incident. "It was my most interesting excuse for being late, but I had video proof," she said.

The Office of the Attorney General will investigate law enforcement's use of force, police said. Police also said all officers involved will be placed on administrative leave, which is standard procedure.

David Sharp and Patrick Whittle of the Associated Press reported for this story.