He stole an ambulance outside Lower Bucks Hospital. Now he's getting a ride to prison.

A man will spend up to seven years in prison for stealing an ambulance outside of Lower Bucks Hospital, which prompted a large police search in Bristol Township last year.

On Wednesday, Cody Dylan Lynn-Phipps, 31, was sentenced to 2½ to seven years in prison for taking the ambulance, driving off and abandoning it, according to the Bucks County District Attorney's Office. He was also sentenced in other criminal cases, bringing his total sentence to 10½ to 25 years in state prison.

Lynn-Phipps, of no fixed address, stole a Penndel-Middletown Emergency Squad ambulance from outside Lower Bucks Hospital in Bristol Township on March 1, 2022. He pleaded guilty in November to all offenses in the case, which include robbery of a motor vehicle, theft, receiving stolen property, unauthorized use of a motor vehicle and escape.

Lynn-Phipps arrested: Patient steals ambulance after EMS squad brings him to Lower Bucks Hospital, cops say

For subscribers: Inside the courtroom when Bensalem couple sentenced for infant son's fentanyl death

Police warn of mail thefts: Mail in sewer, stolen checks 'washed:' What you need to know about Bucks County mailbox thefts

What did Lynn-Phipps do in Bristol Township?

Bristol Township police said Lynn-Phipps was laying in the road near Kenwood Drive and Kindle Lane about 8:30 p.m. He told police he was homeless and tired from walking.

Lynn-Phipps, who was wanted on warrants from Bucks County Probation, was taken to Bristol Township's police station to wait for county sheriff's deputies to pick him up, according to police. While there, he became unresponsive and convulsive, prompting police to give him Narcan.

Penndel-Middletown Emergency Squad arrived and took him to Lower Bucks Hospital for additional evaluation.

As soon as he had the opportunity at the hospital, Lynn-Phipps unbuckled himself and escaped before taking the ambulance, which was running outside.

The vehicle was found unoccupied at the intersection of Prospect and Norwood avenues about 11:10 p.m. It was not damaged.

Several police departments helped try to find the ambulance. A helicopter from Philadelphia police was also used in the search.

Lynn-Phipps was arrested two days later .He was found unconscious in a Nissan Sentra that was reported to be stolen from a dealership, police said.

Lynn-Phipps was also sentenced for assaulting a Bucks County Prison officer, and for biting and spitting on Bristol Township officers during a September 2021 arrest, according to the Bucks County District Attorney's Office.

A message left for his attorney was not immediately returned Thursday.

This article originally appeared on Bucks County Courier Times: Man sentenced to prison for stealing ambulance at Lower Bucks Hospital