An East Village man went to the doctor for a CAT scan – and found he’d had a bullet lodged in his skull for a quarter-century and never knew it.

“The first picture came out [of the CAT scan] and he [the technician] said, ‘Who shot you in the head?'” recalled William Adrian Milton, 59, a writer and prominent dachshund fancier.

“And I said, ‘What do you mean?’ and he said, ‘You’ve got a bullet in your head.'”

Milton went in for the CAT scan on Dec. 28 because he bumped his head in his apartment and his doctor was concerned he might have a blood clot – a possibility because Milton has a heart condition and is on medication.

But instead of a blood clot, they found a bullet.

Milton – the author of “Lavender Light: Daily Meditations for Gay Men in Recovery” and the organizer of the annual Dachshund Oktoberfest in Washington Square Park – immediately realized how it happened that he was shot in the head and never realized it.

He says he was standing on a street in TriBeCa in 1976, photographing a building for a real-estate company, when he heard some men on a nearby loading dock having an argument.

Suddenly he felt a pain in his head and he fell against the trunk of a car.

Blood was streaming down his head and his first thought was that he’d been hit by a falling brick.

At the same moment, one of the men jumped down from the loading dock and ran toward Milton.

“Did they shoot you?” Milton remembers the man saying. Then the man jumped into a truck and sped away.

“I remember the pain was excruciating and startling,” Milton said. “I looked around for a brick but I didn’t see any.

“Blood was streaming down my head and then it started raining, a torrential rain. I just staggered through the rain. In those days you could never get a cab in TriBeCa.”

Milton went home and went to sleep, and when he woke up there was a bump on his head but the bleeding had stopped.

“I didn’t go to the emergency room because I just thought it was a bump from a brick,” he said. “For years there’s been this bump.”

Milton’s doctor, Robert Friedman, said the CAT scan shows a round piece of metal – presumed to be a bullet fragment – lodged between the scalp and the skull on the left side.

Friedman speculated the bullet may have ricocheted and a shard then grazed Milton’s skull and stopped under the skin.

The doctor said he would consider removing the bullet, but Milton said he is inclined to follow the advice of the CAT scan technician who said he should “let sleeping bullets lie.”