“I’ve been watching Zephyr for a while now, and I am just so struck by her courage, her progressive values. She is uniquely independent at a time when her values really matter,” Ms. McCray said in an interview.

“I do not speak for all African-Americans,” Ms. McCray said. “But I do hope to inspire those who consider me a leader.”

The endorsement brings together two women whose political careers could be seen as ascendant, especially by the progressive wing of the Democratic Party. Ms. McCray, who during Mr. de Blasio’s first term often deflected attention, has recently assumed a more prominent role, traveling around the country to promote her and her husband’s work; she has said she is considering a run for office.

And Ms. Teachout, who for much of the race had ceded favorite status to Ms. James, was treated by her rivals at a recent debate as the putative front-runner, showing momentum that Ms. McCray’s support may further fuel.

Ms. McCray’s husband has not yet issued any endorsements in statewide races. His silence is widely perceived as something of a political hedge, especially in the governor’s race: While Mr. de Blasio has long been entangled in a bitter feud with Mr. Cuomo, and closely aligned with Cynthia Nixon — she was one of his most visible supporters in his 2013 bid for mayor — a public declaration for Ms. Nixon, who trails in the polls, could exacerbate the governor’s ire if he wins a third term.