Elvis Presley performs on the NBC soundstage during the 1968 comeback special. (Fathom Events)

It was 1968, and the King was all but dead.

The Summer of Love came and went, leaving the man once seated on the throne of rock-and-roll nothing but a drug-addled relic of a time past. Instead of dancing and necking and maybe even performing for the hippies in Haight-Ashbury, Elvis Presley had spent an endless seven years in Southern California, forsaking his music career for one on the silver screen. Hollywood, though, had not been kind to Presley.

During this stretch, Elvis pumped out movie after movie at an astonishing rate of three to four per year. But fans didn’t want a leading man. They wanted that smooth baritone, those gyrating hips, the coifed hair.

Unlike LL Cool J, Elvis needed a musical comeback. He got that in 1968 in the form of a 60-minute television special that revived his career and changed concert films forever.

That special, now 50 years old, will return to some 500 U.S. movie theaters for a special engagement Thursday and Monday, a celebration of one of rock’s monumental moments — one that almost didn’t happen.

The rocker’s fortunes had begun changing in 1957 when he was drafted into the U.S. Army. The period would prove to be a dark one, during which the life of his mother ended and his drug addiction began.

His introduction to the Army served as an almost metaphorical neutering of the star. His iconic ducktail hairdo was shaved off and his tight leather pants were replaced with a uniform. He was at the zenith of his career when his service in Frankfurt, Germany, began on March 24, 1958, a day the media dubbed “Black Monday.”

He spent his tour in Europe flying fast and high, thanks to a nasty amphetamine habit. His time across the pond was rock-and-roll cliche: He got into fistfights with Germans, caroused around topless clubs and brought dancers back to his hotel, all while fueled by those little pills.

“If I didn’t have them, I’d never make it through the day myself. But it’s okay, they’re safe,” Elvis reportedly told then 14-year-old Priscilla Beaulieu, whom he met during his tour and began dating.

Elvis was changing. So was the American pop music landscape, as its stars slowly disappeared from the public consciousness. Buddy Holly and Ritchie Valens died in a plane crash. Chuck Berry was jailed for transporting a 14-year-old girl across state lines for sexual purposes. Jerry Lee Lewis was shunned for marrying his 13-year-old cousin.

Meanwhile, the Beatles, the Rolling Stones and the Beach Boys appeared, signaling an evolution of the rock-and-roll upon which Elvis built his throne.

When the King returned to the states, he took his talents to Hollywood, quickly pumping out 33 completely forgettable but incredibly bankable movies.

Adjusting for inflation, they made about $2.2 billion domestically. But they were not good. Proof:

For further proof, toss this on and prepare a lengthy apology for both your ears and eyeballs:

His image as a rock-and-roller required rehabilitation, and his hard-charging manager “Colonel Tom” Parker thought he had the perfect idea: a televised Christmas special. (This was not a perfect idea.)

Luckily for Elvis, Steve Binder existed. He produced and directed the NBC project titled “Singer Presents . . . ELVIS” that is now colloquially known as the ’68 Comeback Special. It’s to Binder’s credit that they made a modern concert film instead of the proposed Christmas show.

Binder was not a likely choice for the project. First, he wasn’t a big fan of the singer.

“I was a West Coast kid who was into surf music,” Binder told The Washington Post. “I was amused by Elvis, but I didn’t think we had a lot in common. I thought maybe he’s even a redneck.”

Secondly, he only got into television to enhance his dating life. A friend told him, “If you want to meet some pretty girls, try to get a job at a studio” — so he got a job in the ABC mail room and suddenly realized he had a knack for the medium.

Binder, not expecting much, met with Elvis.

“We didn’t talk about television at all,” Binder said. “He just told me he was uncomfortable doing television, and it wasn’t his turf. He said he only felt comfortable making records.”

Binder liked him and had an idea. He told Elvis, “If we do work together, why don’t you make an album and I’ll put pictures to it.”

There were a couple of obstacles. No one had ever really made a concert movie. And Parker wanted a Christmas special, and Parker generally got what Parker wanted.

Elvis “felt like it was a make- or break-him moment,” Priscilla Presley told The Post. He and Binder knew a Christmas special would fail. So “they bypassed Col. Parker and they did what they wanted to do.”

Elvis moved into the TV studio to avoid a daily drive, and after rehearsals, he would hang around and jam with other musicians, including guitarist Mike Deasy.

“Elvis was comfortable with us musicians. He would come and hang out and even bring his guitar,” Deasy said. “It was just good times. It was some of the best times.”

Binder was watching a session when it hit him: “These guys jamming was better than all the money we’re spending on sets and costumes. I have to get this on tape.”

Instead of some ornate production, Binder told Elvis to put on a show, adding that he shouldn’t “worry about doing television or where the cameras are. Just enjoy yourself, and I’ll find the cameras to be on you whenever you perform.”

That might seem like obvious advice, but it was radical at the time. Normally cameras were set up beforehand, so performers had to stand on “a little T-mark of tape on the floor . . . where the lighting was.”

“I said to hell with all that. We’ll cover you. That relaxed him a whole lot, and I think he honestly forgot he was on TV,” Binder said. “I just set him loose.”

When they filmed the special, Elvis put on a concert, like he had years before. It was absolutely electric, like thousands of volts were shooting through his black-leather-clad, desperately gyrating body while he belted out his tunes.

“I think he had a whole bunch of pent-up energy from those years doing the movies,” Deasy said.

“To me, it was watching Elvis rediscover himself,” Binder said. “When we began the production, he didn’t know if he was famous because of the Colonel and his PR machine . . . but he rediscovered himself. He just gained so much confidence.”

Priscilla, who had never seen Elvis perform until that day, was similarly blown away: “He was so natural. He kidded around with the audience, was kind of flirting. It was so similar to what we actually saw in our den when he’d play his guitar . . . so intimate, so inviting.”

She later sat on her couch with Elvis and actor Sonny West to watch the show.

“Not a word was said until it ended and we started getting calls, and people . . . raved,” she said. “Then you could see him relaxing, you could see him being who he was.”

The special was a towering success. Priscilla said it “gave Elvis the confidence that he needed to start performing again.”

Soon thereafter, he was offered a residency in Las Vegas and went on several nationwide tours.

The King had taken back his throne.