KYIV, July 17 (Reuters) - President Volodymyr Zelenskyy on Sunday (Jul 17) abruptly fired the head of Ukraine's powerful domestic security agency, the SBU, and the state prosecutor general, citing dozens of cases of collaboration with Russia by officials in their agencies.

The sackings of SBU chief Ivan Bakanov, a childhood friend of Zelenskyy, and Prosecutor General Iryna Venediktova, who has played a key role in the prosecution of Russian war crimes, were announced in executive orders on the president's website.

The firings are easily the biggest political sackings since Russia invaded on Feb 24, forcing the entire Ukrainian state machine to focus on the war effort.

In a Telegram post, Zelenskyy said he had fired the top officials because it had come to light that many members of their agencies had collaborated with Russia, a problem he said had touched other agencies as well.

He said 651 cases of alleged treason and collaboration had been opened against prosecutorial and law enforcement officials, and that more than 60 officials from Bakanov and Venediktova's agencies were now working against Ukraine in Russian-occupied territories.

The sheer number of treason cases lays bare the huge challenge of Russian infiltration faced by Ukraine as it battles Moscow in what it says is a fight for survival.

"Such an array of crimes against the foundations of the national security of the state ... pose very serious questions to the relevant leaders," Zelenskyy said.

"Each of these questions will receive a proper answer," he said.

Russian troops have captured swathes of Ukraine's south and east during an invasion that has killed thousands, displaced millions and destroyed cities.

It remains unclear how the southern, Russian-occupied region of Kherson fell so quickly, in contrast to the fierce resistance around Kyiv that forced Russia eventually to withdrew to focus on capturing the industrial Donbas heartland in the east.

In his nightly speech to the nation, Zelenskyy noted the recent arrest on suspicion of treason of the SBU's former head overseeing the region of Crimea, the peninsula annexed by Russia in 2014 that Kyiv and the West still view as Ukrainian land.

Zelenskyy said he had fired the top security official at the start of the invasion, a decision he said had now been shown to be justified.

"Sufficient evidence has been collected to report this person on suspicion of treason. All his criminal activities are documented," he said.

Bakanov was appointed to head the SBU in 2019, one of an array of new faces who rose to prominence after Zelenskyy, a former comedian, won election earlier that year.

Zelenskyy appointed Oleksiy Symonenko as the new prosecutor general in a separate executive order that was also published on the president's site.