Most of Scott Stringer’s Supporters Have Fled. Not the Teachers’ Union.

“Am I troubled by the allegations? Of course,” she said, adding, “I’m also a unionist who has dealt with false allegations.”

Tyrone Stevens, a spokesman for Mr. Stringer, said the campaign was “thrilled to have the ongoing support of champions for public education, because they know the next mayor needs to be ready on day one to invest in our children and bring our schools back stronger than ever.”

Some parents and mayoral candidates have accused the union of slowing the pace of school reopenings in New York over the last year. But with the majority of families still choosing to learn remotely, there is no evidence of a significant public backlash against the union.

Other major unions have endorsed Mr. Stringer’s rivals, with several lining up behind Eric Adams, the Brooklyn borough president. But the U.F.T. backed Mr. Stringer, a longtime ally of the union, last month. When the U.F.T. president, Michael Mulgrew, was asked whether his 200,000-member union would support whoever the Democratic nominee was, he replied that Mr. Stringer would in fact be the nominee.

That was a cheekily confident projection even then, when limited public polling showed Mr. Stringer regularly polling third or fourth in the race. But just a week after the U.F.T. endorsement, Jean Kim, a political lobbyist who worked on a 2001 campaign for Mr. Stringer, said the candidate groped her on several occasions during that race. Mr. Stringer has vehemently denied the allegations, and has said that he and Ms. Kim had a brief, consensual relationship.

Mr. Stringer has been competing for the left flank of the city’s electorate against Maya Wiley, a former counsel to Mayor Bill de Blasio, and Dianne Morales, a former nonprofit leader, both of whom have picked up endorsements and energy from progressive groups in the wake of Ms. Kim’s allegations.

In a recent interview with Bloomberg News, Mr. Mulgrew said his union was still backing Mr. Stringer in part because the accusations have not been proven.

“One reason why unions got formed is that people get treated unfairly,” Mr. Mulgrew said. “There are lots of allegations all the time in the work we do.”

Jeffery C. Mays contributed reporting.