Councilman Corey Johnson of Manhattan is close to securing the New York City Council’s speakership, the municipal legislature’s top leadership post, according to two sources briefed on the matter.

According to the sources, Johnson — who is 35 and originally from Massachusetts — has secured the support of a sufficient plurality of borough party bosses, who typically instruct the delegation on how to vote.

Johnson, who represents Chelsea, Hell’s Kitchen and parts of midtown, did not reply to a text message seeking comment Wednesday afternoon.

Johnson has been open about his personal battles with drugs, cigarettes, alcohol and HIV. At Tuesday’s council meeting, Johnson said he is proud to hold the same seat once occupied by the chamber’s first openly HIV-positive and gay member, Thomas K. Duane.

As high school football captain in 1999, Johnson came out of the closet to his teammates — a story told the next year on the front page of The New York Times.

“Someday,” he said then, “I want to get beyond being that gay football captain.”

Now, nearly 20 years later, he’s facing off against seven other council members running for council speaker: Robert Cornegy and Jumaane Williams of Brooklyn, Donovan Richards and Jimmy Van Bramer of Queens, Ritchie Torres of the Bronx, and Mark Levine and Ydanis Rodriguez of Manhattan.

On Wednesday night, Rodriguez released a statement congratulating Johnson on securing the speakership.

"In Corey, I know we will have a Speaker that will work day and night to ensure that the interest of the most vulnerable New Yorkers is top priority," Rodriguez wrote, calllng out Johnson's work on a health committee "to create policies that give access to all."

The speaker will be picked by the 50 other council members and support for Johnson isn’t guaranteed, both sources cautioned. “It ain’t over till it’s over,” one said.

Levine is Mayor Bill de Blasio’s preferred choice for speaker, but the party bosses are reluctant to allow the mayor the sort of influence he wielded four years ago, when he helped cut a deal that installed Melissa Mark-Viverito of Manhattan and cut out the majority of the bosses, the sources said.

The speaker, one of the most powerful posts in city government, negotiates the budget, controls the flow of legislation and decides who gets committee chairmanships.