Ukrainian President Volodymyr Zelenskyy announced Friday the resignation of his powerful chief of staff, Andrii Yermak, who was also the country's lead negotiator in talks with the U.S, after Yermak's residence was searched by anti-corruption investigators.

The unprecedented search at the heart of Ukraine’s government come at a time when Kyiv is under intense U.S. pressure to sign a peace deal nearly four years after Russia's full-scale invasion.

Yermak has been a trusted confidant of Zelenskyy's for years, and the Ukrainian leader has long resisted pressure to replace him.

His departure is a blow for the Ukrainian leader that risks disrupting his negotiating strategy.

In a nod to likely controversy over Yermak’s long stay at his side, Zelenskyy’s said Russia was waiting for Ukraine to make missteps and upset the delicate and tense peace negotiations.

Yermak’s name did not appear on a list of officials that Zelenskyy said would make up the Ukrainian delegation for the next round of negotiations with the United States.

Zelenskyy said that “to preserve our internal strength, there must be no reasons to be distracted at anything else except for defense of Ukraine. I don’t want anybody to be questioning Ukraine, and that’s why we have today’s decisions.”

In his nightly address, Zelenskyy announced that he was “resetting” the presidential office.

He said Yermak had submitted his resignation and that he would begin consultations Saturday to appoint a new chief of staff.

Two national agencies fighting corruption in Ukraine said their search targeted Yermak.

Oleksii Tkachuk, a spokesperson for Yermak, said the anti-graft agencies had not served Yermak a notice of suspicion, meaning he was not a suspect in an investigation.

Yermak was not told what the searches related to, Tkachuk said.

Yermak, a powerful figure in Ukraine and a key participant in talks with the United States, confirmed the search of his apartment inside the presidential compound in downtown Kyiv, where checkpoints limit public access.

Media reports said Yermak's office was also searched, but investigators declined to comment on that.

It was not clear where Zelenskyy or Yermak were at the time of the morning raid.

“The investigators are facing no obstacles,” Yermak wrote on the messaging app Telegram.

He said he was cooperating fully with them and his lawyers were present.