The new HBO series “The Deuce,” which premiered last Sunday, draws viewers into the seedy, sexually twisted Times Square of the early 1970s.

The world depicted — a gaudy swirl of peacocking pimps, duplicitous cops and abuse-scarred prostitutes — seems too wild to be true. But Josh Alan Friedman, who covered the blighted neighborhood for the pornographic newspaper Screw in the 1970s and ’80s, says the blocks between 34th and 50th streets really were as libertine as the series suggests.

“I was 20 years old, had low self-esteem and felt electrified by Times Square,” the now 61-year-old Friedman says. His column, “Naked City,” sent him prowling through Times Square’s bars, porn palaces, burlesque joints and peep-show booths for salacious stories — and he found them.

Drawn to the Deuce

Improbably, Friedman’s paycheck was also his passion. He remembers being drawn to Times Square years before signing on at Screw.

In 1972, Friedman’s family moved from the suburbs into the iconic Eldorado building on Central Park West. That’s when the 16-year-old took his first unchaperoned trip to the Midtown neighborhood.

“I [came] up from the subway and [took] a deep breath of Times Square air for the first time without my parents,” he tells The Post. There, he and his brother got breakfast. “We ate pancakes, sitting among pimps and prostitutes, who had just finished long nights of work.” He laughs. “Things went downhill from there.”

Working for Screw exposed him to the grittiest elements of the city’s underbelly: wolf packs ready to pounce on the naive and unaware; drug dealers with mantras of “Loose joints, ludes, black beauties” and, of course, “1,200 hookers under every awning, in every doorway, staking out every corner.”

But it wasn’t all unimaginative sleaze. Friedman remembers a second-floor brothel called Cupid’s Retreat, which had an outdoor theme (hookers entertained johns inside tents). There was a place for topless shoeshines and an Irish restaurant called Dinty Moore’s, which, for some reason, served kosher cuisine.

For a more straightforward meal, Friedman would hit up the area’s reigning delicatessens, the Carnegie and the Stage. For years, says Friedman, the Stage was the place to eat: “Walk into the Carnegie and there’d be two hookers and Milton Berle.” (He thinks the Carnegie edged out the Stage as the go-to spot because “the most repulsive-looking delicatessen owners served the most delicious food. In 1980, the Carnegie got two ugly owners, Leo Steiner and Milton Parker . . . and the place took off.”)

For all its highs and lows, Friedman loved the Times Square beat, and had it virtually all to himself. “Others were frightened, or considered it to be beneath them.” But not Friedman: “It was the loner’s paradise,” he says — and he fit right in.

Oral history

Friedman’s new podcast, “Tales of Times Square: The Tapes,” centers on interviews with the most compelling characters he encountered during his 11 years covering the Deuce (so nicknamed for the “2” in “42nd”).

The podcast suggests that Friedman has a soft spot for the neighborhood’s old-timers, who preceded its sleaziest era. They’d settled in back in the 1940s and ’50s, when Times Square still stood as the ragged edge of legitimate entertainment.

‘It was the loner’s paradise.’

There was Charlie Rubenstein, who had been in the penny arcade business for decades and was coaxed out of retirement when Pac-Man caused revenues to surge. Then, there was Izzy Grove, a former middleweight boxer who once booked the young Duke Ellington and Billie Holiday, using phone booths as makeshift offices.

But Friedman’s favorite crew was the guys who ran Melody Burlesque, the all-nude joint where, Friedman claims, lap dances were invented.

“They let me hang out in the back office with the bookies and racetrack touts,” Friedman says. “There was Bob Anthony, a tough guy who had been Frank Sinatra’s first bodyguard, and he ran the operation. His sidekick was Manny Rosen, a lightweight contender who was 80 years old in the late ’70s. Before the Melody, he worked at the Stage Deli making toast.”

Despite Rosen’s advanced age, Friedman says, “Manny schtupped the strippers who walked in and out of the office. Broads loved him.”

Hopelessly hooked

While working girls portrayed on “The Deuce” crack wise with street-smart patter, Friedman remembers them differently. His interviews with hookers often proved unusable.

“They’d be mumbling because they were stoned or inebriated or just inarticulate,” says Friedman.

Then again, they didn’t exactly warm to the man asking questions. He remembers being snubbed at Bernard’s, a discreet lounge where strippers and working girls nipped in to take boozy break hours.

Maybe they viewed him as a bit of an oddball. “I never indulged in lap dances and never dropped trou in public,” Friedman says. “I was a nice Jewish boy and they weren’t used to that. They were used to powerful, abusive men . . . So they insulted me and laughed at me; they’d be condescending and aloof. They didn’t know how to treat a nice guy.”

Many of those women’s flashily dressed pimps lived in a former hotel on West 54th Street and Eighth Avenue, Friedman recalls. “You had 100 pimps living there and the building faced a police precinct.

“To keep the pimps from walking out and blocking traffic, law enforcers used police horses to create a corridor that the men walked down. They used to say that it was ‘two pimps wide.’ ”

Unforgettable encounters

Friedman has two favorite memories from his time on the beat, and they couldn’t be more different.

In 1979, Bella Abzug and Gloria Steinem led the Women Against Pornography march through Times Square. Friedman says, “Things reached a fever pitch, with the marchers yelling, ‘We say no.’ Girls came out of the peeps, holding dollar bills and chanting, ‘Money says yes’ . . . You had a mob of angry women and [shop owners] were scared of getting their windows broken!”

His second most outrageous recollection was far less public. It involved Larry Levenson, the portly owner of a notorious swing club called Plato’s Retreat. “He bet a bunch of mobsters thousands of dollars that he could have 15 orgasms in 24 hours,” remembers Friedman.

“And he did. They all watched. He won like $10,000 and got paid off in peep-show cash. I remember Butchie Peraino [a local fixture with Colombo crime family connections] peeling off ones that had come straight from the booths.”

Going straight

By 1987, Friedman had already written a memoir of his time in the Deuce, “Tales of Times Square.” His wife to be — whom he first encountered through the street-facing window of Screw’s art department — was from Texas and desperately wanted him to move there with her. Friedman relented, and they were married in 1989. Today, the couple lives in Dallas, where Friedman performs and records blues music.

Though he’s long since settled down, it’s hard for Friedman to shake his love for a widely reviled time and place.

“We had a unique neighborhood with low-life culture alongside the high life of Broadway,” he says wistfully. “It all existed in this urban ecosystem that came about naturally.”

The neon-drenched chunk of Midtown, he says, was “the most democratic neighborhood for sex in all of America. Now it’s tourist chains and hypergentrification.

“Times Square got cleaned up and lost its soul.”