SpongeBob SquarePants was recently spotted in an unusual place.

In a recent medical case, doctors saw the image of SpongeBob, the sea-dwelling character of children's cartoons, while looking at an X-ray of a 16-month-old boy. The toddler in Saudi Arabia had been brought to a hospital because he appeared to have swallowed an object. But his doctors were surprised to look at the X-ray and see SpongeBob looking right back at them, with a big smile on his face and his tongue sticking out.

It turned out that the hapless SpongeBob was a pendant that belonged to the toddler's sister, said Dr. Ghofran Ageely, a radiology resident at King Abdulaziz University Hospital, in Jeddah, Saudi Arabia.

The first X-ray that Ageely looked at was one that showed the child's body from the side, and all she could tell was that there was a thin object in the child's esophagus, Ageely told Live Science in an email. She thought the object was a pin or hair accessory.

An X-ray shows a lateral view of a SpongeBob pendant in a toddler's throat. (Image credit: Dr. Ghofran Ageely)

"Then I opened the frontal view and was shocked. 'SpongeBob,' I screamed!!! I was amazed by the visible details. You can see his freckles, shoes and fingers…AMAZING," Ageely wrote in an email to Live Science. [16 Oddest Medical Case Reports]

Doctors freed the stuck pendant from the boy's esophagus without any complications, and the boy went home. Ageely later shared the X-rays of SpongeBob's adventure on Radiopaedia.org, a Wikipedia-type forum where radiologists and medical students present and discuss medical cases such as foreign body ingestions.

"We see a lot of amazing X-rays on our site, but this one is particularly amazing," said Dr. Andrew Dixon, the managing editor of Radiopaedia, and a radiologist at The Alfred Hospital in Melbourne, Australia.

The detail in SpongeBob's face is strikingly visible on the scans because his face was not only painted on the pendant, but rather is also made of tiny ridges in the metal, Dixon explained.

Although seeing SpongeBob's smiley face was a surprise, the case is only one example of a far too common problem -- children swallowing or even inhaling small objects, especially toddlers between 1 and 3 years old.

"As a father, I know kids put things in their mouth all the time. But as radiologist, we see this not infrequently," Dixon said.

An X-ray shows a SpongeBob pendant that a toddler swallowed. (Image credit: Dr. Ghofran Ageely)

Sometimes the object passes through the child's digestive system without a problem, but other times, it gets stuck and requires a trip to the emergency room. X-rays are a helpful tool when parents suspect their kids have swallowed something but they are not quite sure, Dixon said.

Parents who suspect their child might have swallowed an object should watch the child for symptoms such as vomiting, gagging, drooling, stomach pain, coughing or wheezing, and call a health care provider or local emergency number, such as 911, the National Institutes of Health advises. If a child has obvious breathing problems, he or she needs to be taken to the emergency room immediately.

Email Bahar Gholipour. Follow Live Science @livescience, Facebook & Google+. Originally published on Live Science.