New York Attorney General Letitia James will suspend her campaign for governor, a surprise announcement that will upend the race to fill the seat vacated by former Governor Andrew Cuomo.

James said she will instead pursue re-election as the state attorney general, citing her office's ongoing investigations.

"I have come to the conclusion that I must continue my work as attorney general," James wrote in a tweet on Thursday. "There are a number of important investigations and cases that are underway, and I intend to finish the job."

James, a Brooklyn Democrat, is currently leading a civil fraud probe into the Trump Organization and suing to dissolve the NRA.

She launched her bid for governor on Oct. 29, emphasizing the historic nature of her candidacy: No Black woman has been elected governor of a state before.

Her campaign came on the heels of a bombshell August report from private attorneys hired by her office, which concluded then-Governor Andrew Cuomo sexually harassed 11 women, including nine state employees. The report helped force Cuomo’s resignation.

But James struggled to gain traction in the race, trailing well behind current Governor Kathy Hochul in a variety of public opinion polls in recent weeks. The latest came Tuesday, when Siena College released a poll showing Hochul with a healthy lead in a potential five-way Democratic primary, garnering 36% of the vote. James, meanwhile, came in a distant second at 18%.

While the latest campaign finance figures won’t be out until January, Hochul is believed to have a lead on that front, too. She has held repeated campaign fundraisers since taking office in August, aggressively courting donors in New York City, Albany and throughout the state.

In November, her campaign claimed she had already raised at least $10 million since becoming governor, a fundraising haul that, if confirmed, could outpace even the best six-month period attained by Cuomo, himself a prodigious fundraiser.

At a press conference on Thursday afternoon, Hochul said James had called her earlier in the morning to let her know she was bowing out of the race.

"I respect her tremendously, always have," Hochul said, noting she would support James's re-election bid for attorney general. "This is a very bad day for Donald Trump and the NRA when we have Tish James, one of the finest Attorney Generals in the country, very focused on making sure that justice is done."

James had been noticeably absent from the campaign trail in recent weeks, fueling speculation about the future of her candidacy. Within minutes of the announcement, Assemblymember and Brooklyn Democratic Leader Rodneyse Bichotte, a James ally, announced her endorsement of Hochul.

In addition to Hochul, the field of candidates for governor includes Democrats Jumaane Williams and Tom Suozzi, as well as Republicans Rob Astorino, Andrew Giuliani, and Lee Zeldin. New York City Mayor Bill de Blasio, who leaves office at the end of this month, is also widely believed to be considering a run.

Outside City Hall on Thursday, Williams reacted to the news that James was dropping out.

“We're all just processing it,” he said. "She's obviously always been a very dedicated public servant, she's showing that one more time focusing on the things she's working on now.”

James’ pivot is sure to have ripple effects in the race for attorney general, where at least a half dozen Democrats had already declared their intention to run for what they had believed would be an open seat.

Shortly after James’ announcement on Thursday, State Senator Shelley Mayer of Yonkers dropped out of the race. Instead, she said, she will endorse James’ reelection “wholeheartedly.”

“I am confident that with the strong and principled leadership of Governor Hochul and Attorney General James, the state will continue on the right path,” Mayer said in a statement.

Additional reporting by Brigid Bergin.