(Scroll down for video) A prisoner was rushed to a hospital after he made the bad decision of swallowing a cellphone, according to doctors in Ireland.

The 29-year-old prisoner, who was not identified, underwent surgery at the Adelaide and Meath Hospital in Dublin, after doctors were unable to pull out the phone.

Doctors were unable to wait around for the phone to come out as the patient was vomiting for four hours straight. The prisoner was brought to the hospital after telling officials that he swallowed a phone.

An X-ray proved that he had a phone stuck in his esophagus.

The phone was identified as a Long-CZ, which in only 2.3 inches long and 1 inch wide. It is the smallest mobile phone available on the market.

The man told a doctor that he wanted to smuggle the phone into prison.