It’s one of the most famous trademarks of the 20th century: a dog, perhaps a terrier mix, looking at a gramophone horn, head tilted quizzically.

It’s from an 1898 painting called “His Master’s Voice.” The dog has a name — and a story that may bring a lump to the throat of any dog lover.

His name was Nipper. The official story says the name refers to his unfortunate way of greeting strangers when they came to the house, but that might be fanciful. People usually don’t wait until they detect a trait before they name a dog, or there’d be a lot more Droolers and Humpers.

Nipper belonged to Mark Barraud, a scenery designer for a London theater. Barraud died in 1887 and Nipper went to live with Barraud’s brother, Francis, a painter. The first painting of Nipper was called “Dog looking at and listening to a Phonograph,” and showed an Edison cylinder player. Barraud offered the company’s representative the painting for use in advertisements.

“Dogs don’t listen to phonographs,” said the Edison rep.

Barraud took the work to Edison’s competition, the Gramophone Co. They offered to buy the painting, if Barraud would rework the image to show Gramophone disks instead of cylinders. Within a few years it would be the Gramophone trademark in England, and also RCA in America. Nipper gained recognition on both sides of the ocean.

But by then, he’d been dead for years.

Nipper, who lived for 11 years, died in 1895, well before he was captured in the famous painting. He was buried in a park in London. The park was paved over decades later, and a bank now stands on the site. There’s a plaque inside that memorializes Nipper’s resting place, and the street outside is called Nipper Alley.

But his posthumous fame was appropriate, considering the circumstances around the painting.

Nipper was long gone when Barraud painted him listening to a record, but so was the voice that came from the speaker. Mark Barraud had recorded his voice on some cylinders, and these passed to his brother. Nipper was not only listening to his master’s voice, he was listening to his dead master’s voice.

That might explain some of Nipper’s confusion, made obvious in the painting by the tilt of his head.

Do dogs believe in ghosts? It seems like Nipper did.