He writes the songs that make people run.

Some Rite Aid stores in California have taken to blasting Barry Manilow tunes as part of a plan to make loiterers scramble.

Employees told the Wall Street Journal that the drugstore chain has been testing the tactic of playing songs by the 75-year-old crooner outside their stores — over and over, loudly — to deter panhandlers and vagrants.

But the plan has also left neighbors mystified.

“I thought some older man had died and left a Barry’s Most Depressing Hits CD on repeat,” said Lisa Masters, a professional drummer in Long Beach who couldn’t open her windows without hearing “Mandy” blaring.

“I felt trapped in an episode of ‘The Twilight Zone,’” she said.

When she called Rite Aid, she said an employee explained that the Manilow technique had worked at other locations and was now working in Long Beach.

“His attitude was, ‘Would we rather have panhandlers or Manilow?’” Masters said.

A Rite Aid spokeswoman told the paper that customers were finding it difficult to enter some of their stores because of loiterers, so the chain started employing a couple of deterrents — including Barry Manilow.

“We are in the early stages of exploring this approach and have not made any decision about the potential rollout of this to additional stores,” she said.

The Manilow technique has also been used at a Rite Aid in San Diego, according to WCPO.

Over in Hollywood, neighbors have also been subjected to the Manilow music when strolling outside Rite Aid.

John Fields, a record producer for the Jonas Brothers and Miley Cyrus, posted a video on YouTube showing him walking outside the drugstore as “Somewhere Down the Road” plays.

“Another night with Barry Manilow,” he says.

For some, the music is soothing.

“It’s one of those beautiful moments,” LA comedian Debra DiGiovanni said of hearing “I Write the Songs” on repeat.

“I know all the words. When I was in my 20s, we might have made fun of him, and now I’m in my 40s and he’s nostalgic. It reminds me of Mom and Dad in a lovely way.”

Manilow, a Brooklyn-born star whose career has spanned more than 50 years, hasn’t heard about the tactic, his publicist said.

“It’s not very kind that people don’t want to stand around and listen to his music,” she said. “It’s odd. He wouldn’t comment on something like this. I don’t think he knows about it.”