A dog needed life-saving surgery after swallowing a golf ball while walking near his local course.
Pongo the Dalmatian was only X-rayed by vets when he was taken for treatment for a urine infection.
But the scan discovered there was something more serious causing him problems.
Pongo was rushed for an emergency operation to remove the ball, which vets say could have killed him if it had moved and caused a blockage.
Pongo's owner Jack Harvey, from the Muirhouse area of Edinburgh, was surprised when he found out the cause of his pet's issue.
He said: "I often walk him by a local golf course and he likes to play with the stray golf balls, but I've never seen him swallow one.
"It was a complete shock when they told me what they had pulled out of his stomach."
He added: "I've still got the golf ball he swallowed as a reminder and hopefully he's learned his lesson. I'm planning on watching The Masters this weekend but I think Pongo's had more than enough golf for one year."
Staff at PDSA Edinburgh initially suspected Pongo was suffering from bladder stones, a common ailment for Dalmatians.
Vet Gemma Hepner said: "We were primarily looking at the bladder, but the X-ray captured his stomach too - we could clearly see a foreign body in there.
"We knew it was a ball of some kind by the shape but couldn't tell exactly what type.
"It was too big for him to pass and there was a real risk it could cause a fatal blockage in his stomach or his intestines if it were to move, so we had to operate to remove it.
"It could have been there a day or two, or it may have been rolling around in there for weeks, but it could definitely have led to disaster so it's lucky we X-rayed him when we did."
PDSA said it handles many cases of pets eating unusual objects.
The behaviour - known as pica - is when pets, especially puppies and younger dogs, use their mouth to investigate objects that can be swallowed by mistake.