Owner Chris Morrison had been taking five-year-old black labrador Oscar round the Pitreavie golf course in Dunfermline for several months.
He took Oscar to the vet after noticing a rattling sound coming from his pet’s stomach.
They then discovered that 13 balls - each weighing 45 grams - were lodged in his stomach.
Mr Morrison, a planning administrator, said one of the balls had been in his stomach so long that it had turned black and was decomposing.
He said: “He finds golf balls like truffles. We’re not sure how long exactly this happened over, but it must have been a fair period - several months at least.