NEW YORK — Ruth Messinger was a history-making politician in New York City as the first woman to secure the Democratic nomination for mayor. But Messinger isn’t backing a woman in this year’s race, saying she thinks the best candidate is Stringer, the city’s comptroller.

“I know Scott is exactly the leader we need right now. A leader who is tested, serious, and up to the task at hand,” Messinger said.

While three other women are in this year’s race, Messinger shares deep political roots with Stringer on Manhattan’s Upper West Side.

First elected to the City Council in 1978, Messinger spent 12 years as a lawmaker before being Manhattan borough president for eight years. After winning the Democratic nomination in 1997, she lost to incumbent Mayor Rudy Giuliani.

Stringer’s campaign announced the endorsement with a video featuring Messinger, in which she details Stringer’s time in politics and his experience in city government as key qualifiers for the job.

“I lay claim to having thought a lot about what it means to be mayor of New York City and what it takes to do it well,” Messinger says in the campaign video. “It requires a comprehensive understanding of how this bureaucracy works or how often it does not work.”

Messinger recently discussed her experience running for mayor as a woman, telling NY1 in an interview in March, “On almost every front, New York thinks of itself as being more progressive than it necessarily is. In some areas we are, but in getting women in elected office we're not."

In its history, New York City has elected 109 mayors, all of them men.

The three women running the Democratic nomination are: Maya Wiley, a former MSNBC legal analyst; Kathryn Garcia who formerly served as the city’s sanitation commissioner; and Dianne Morales, a former non-profit CEO who is the only Latina in the race.