In January, as Congress swore in a record 10 openly L.G.B.T.Q. members, Ritchie J. Torres, a 31-year-old Bronx councilman, recalled how the moment filled him with admiration, but also a sense that the accomplishment was still incomplete.
Mr. Torres, who is the first openly gay person to hold elected office in the borough, noted that not one of the 10 was black or Latino. He now hopes to be the first.
Mr. Torres on Monday will officially announce his candidacy for the Bronx seat soon to be vacated by Representative José E. Serrano, the longest serving Hispanic congressman in the country, who is retiring because he has Parkinson’s disease.
The race to replace Mr. Serrano, who has served since 1990, is shaping up to be a referendum on whether the Bronx is ready to elect a younger progressive politician.
But the Democratic primary may also be defined by another dynamic: Rubén Díaz Sr., Mr. Torres’s colleague on the City Council and a Pentecostal minister with a decades-long history of making homophobic remarks, is also seeking the seat.
“Someone like Rubén Díaz winning that seat would be a minus,” said Sean Meloy, senior political director at the Victory Fund, a political action committee that supports L.G.B.T.Q. candidates, and has endorsed Mr. Torres. “It would be like losing a seat for equality.”
Mr. Díaz, 76, has made it clear over the decades how he feels about homosexuality. In 1994, he said that the Gay Games coming to New York would help spread AIDS and teach young people that “homosexuality is O.K., that it is not immoral or sinful behavior.”
As a state senator, he vocally opposed gay marriage, once holding a rally against the legislation to authorize it as his gay granddaughter held a counterprotest across the street.
In February, Mr. Díaz, who was elected to the City Council in 2017, sparked calls for his resignation when he said the “homosexual community” controlled the City Council.
Mr. Torres called for Mr. Díaz to apologize and to be removed from the chairmanship of the Committee on For-Hire Vehicles. Mr. Torres gave a speech from the floor of the Council chambers condemning Mr. Díaz, before the committee was dissolved, and talked of how he had thoughts of suicide related to depression and the struggle with his identity as a young man.
Afterward, he and Carlos Menchaca, an openly gay councilman from Brooklyn, hugged.
“To have an elected official attack the quality and dignity of L.G.B.T. people sends a message to young people who are thinking of taking their own life as they struggle with their identity,” Mr. Torres said.
Mr. Díaz said his views on homosexuality are based on his religion, and that voters in the 15th Congressional District, one of the poorest in the country and predominantly Hispanic and black, accept that. Mr. Díaz calls himself a “conservative Democrat” and recently referred to himself as the “opposite” of Representative Alexandria Ocasio-Cortez, the popular democratic socialist.
“My family is full of gays,” he said. “I don’t believe in gay marriage but that doesn’t mean I hate people.”
Those are the sort of comments that make this congressional race urgent, according to the Equality PAC, which supports L.G.B.T.Q. candidates running for federal office, and has also endorsed Mr. Torres.
“What makes this race so important is that it’s shaping up to be a contest between Ritchie Torres and Rubén Díaz, someone who has demonized the L.G.B.T.Q. community throughout his career and shown a profound lack of respect,” Representative David Cicilline, a Democrat from Rhode Island and co-chairman of Equality PAC, said in an interview.
The outside attention is already paying dividends. Mr. Torres estimates that he has already raised more than $500,000. In a fund-raising email last week, Mr. Díaz said that he had raised $80,000.
Mr. Torres said the race is not just about keeping Mr. Díaz out of Congress. His goal is to be a “national champion for the urban poor,” a group whose ranks included him and his family while growing up.
Mr. Torres was raised in public housing in the Bronx where his single-parent mother worked minimum wage jobs to support him and his siblings. He thought he might be gay starting in junior high school but kept it to himself out of fear.
“I was concerned that if I came out of the closet, that at best, I would face ostracism, and at worst, face violence,” he said.
As a student at Herbert H. Lehman High School, Mr. Torres recalled first coming out to a teacher who he believed was gay because of his posts on social media; he then told a wider audience during a debate about gay marriage. He announced he was gay while arguing in favor of gay marriage.
“I consider the culmination of my coming out my first race for City Council,” Mr. Torres said. “I was out to friends and family, but not the rest of the world.”
That changed in 2014 when he became the youngest elected official in New York City, and was named to the City Council’s leadership team, and became chairman of the Committee on Public Housing.
As chairman, he spotlighted the same decrepit living conditions — lead and mold — that he grew up in, holding his first hearing as chair of the committee in public housing. During the 2016 presidential election, Mr. Torres paved the way for Senator Bernie Sanders of Vermont to visit a public housing complex in Brooklyn.
“We’ve had a couple of years of Nycha being in a visible crisis but at the beginning of Ritchie’s term it was a much less visible crisis,” said Brad Lander, a councilman from Brooklyn who is endorsing Mr. Torres.
Gil Simmons, 54, the tenant president of Monterey Houses in the Bronx, said Mr. Torres has brought resources to help make life better at the complex.
“He has an understanding of what we go through on a daily basis because he went through it,” Mr. Simmons said.
After an unsuccessful run for speaker, Mr. Torres was named as chair of the newly created Committee on Oversight and Investigations, where he helped expose more problems at Nycha. He recently proposed a law to ban retailers from going cashless.
Mr. Torres’s announcement video shows him speaking with residents in public housing, including his mother who still lives there with his brother. The video shows the contrast between the Throggs Neck Houses, where he grew up, and the publicly financed golf course operated by President Trump across the street.
He said his time on the City Council — he is prohibited by the City Charter from running for a third consecutive term — has shown him how federal policies have a profound effect on people’s lives, citing the disinvestment from public housing.
“The rules are set in Washington D.C.,” Mr. Torres said. But the June 2020 Democratic primary “is truly a struggle for the soul of the Bronx.”