In the seedy shadow world of HBO’s “The Deuce,” home to the flophouses, brothels, nightclubs and peep shows that once littered 42nd Street in Manhattan, an illicit subculture operates with its own rules and vicious hierarchies. The actions of the powerful reverberate down the chain, from the mobsters who control the area to the sex workers at the bottom . Along the way, the pornographers and dealers and pimps take their cut. And that’s before City Hall has its say.

The show’s creators, David Simon and George Pelecanos , specialize in dissecting these urban organisms. Before coming to television, Simon and Pelecanos covered crime from different angles — Simon as a reporter for The Baltimore Sun and Pelecanos as the well-regarded author of D.C.-based detective fiction. The two have since collaborated on the tough and sprawling HBO dramas “The Wire” and “Treme.” The porn-era Times Square of “The Deuce,” with all its degradation and struggles for dignity, seems right in their wheelhouse — and also timely.

“It’s a labor story first and foremost, and not a lot has changed,” Pelecanos said, pointing to the “Access Hollywood” tape, in which President Trump admitted to grabbing women by the genitals. “If that can happen now, and all of these things can happen now, we want to tell the story of how we got here.”

Each season of “The Deuce” has jumped forward in time: The first, set in 1971 and ’72, is about mobsters wrangling neighborhood sex workers into a network of peeps and parlors; the second covers the height of “porn chic” in 1977; the third, premiering Monday on HBO, opens on New Year’s Eve in 198 4, as the neighborhood is about to undergo a sweeping transformation.