Bernie Ilson was only about a month into his job as publicist for a TV show when he got the telegram from his boss in London, giving him his first big assignment.

“Just signed The Beatles,” the autumn 1963 missive from Ed Sullivan said. “Start the publicity.”

Ilson was baffled. What was the big deal about this British band his boss had signed for just $8,500 for three “Ed Sullivan Show” appearances?

“I thought that he spelled ‘beetles’ wrong because I hadn’t heard of them,” he tells The Post. He made some calls and found out they were a British group, but their records hadn’t really made it to America yet.

“‘Well then, I’ve got my work cut out for me,” Ilson recalls saying.

That “work” ended up being the groundwork for the Beatlemania phenomenon — the behind-the-scenes reason why 73 million fans tuned in to “The Ed Sullivan Show” on Feb. 9, 1964, even though it was the band’s first appearance. If Beatlemania lit America on fire that day, Ilson says he’s the one who poured the gasoline.

But first, he had to get the music on the air. He started calling disc jockeys and selling them on the band, saying they were huge in Europe and about to break in America. Many dug the new sound.

“Some of them really started playing them hot and heavy,” says Ilson, now 89 and still living in the same Midtown apartment he moved into when he started at “Sullivan.”

Next came the press. He pitched to newspaper and magazine editors, including at the influential Life magazine, which told him repeatedly they weren’t interested.

Until, that is, an editor at Life was driving through Westchester with his teenage daughter while listening to the radio. A Beatles song came on, and his daughter demanded he pull over so she could hear The Beatles without the radio cutting out. All the kids at school were nuts for these Brits, she told her father.

Sensing a trend, the editor went to the office the next day and told his entertainment desk to do a story about The Beatles. After rebuffing his nearly daily pitches, the editor finally called Ilson and said, “We’ve got to get to The Beatles. Where are they?”

A reporter and two photographers tracked the band down in Paris. A five-page story appeared in the magazine in early January.

When The Beatles arrived in New York in early February, Ilson had set up a whole day of interviews at the Plaza Hotel, where they were staying. Hundreds of disc jockeys and newspaper reporters from all over the country.

“Everybody wanted to talk to them,” he says. The Beatles “were smart enough to go right along with it.”

Reporters back then weren’t interested in the personal details that are an inescapable part of celebrity profiles today. Even though John Lennon had his then-wife, Cynthia, with him, and Paul McCartney had a girlfriend with him, reports rarely mentioned they were attached. That helped keep the heartthrob allure alive for teen girls everywhere.

The p.r. machine worked. The show received 50,000 requests for the 750 available seats at the show. When Sunday night rolled around, 73 million people were gathered around their TV sets.

“By time they came here, they were as well known as you can imagine,” says Ilson, who went on to write the 2010 book “Sundays With Sullivan: How ‘The Ed Sullivan Show’ Brought Elvis, the Beatles, and Culture to America.”

“When The Beatles were there, it wasn’t as if it was an ordinary show. You couldn’t get within a block of that theater unless you had a ticket.”