JUBA South Sudanese President Salva Kiir sacked his cabinet, the deputy president and suspended his top negotiator at talks to defuse tensions with Sudan on Tuesday, state media said, amid talk of a succession struggle in the African oil producer.
Analysts said Kiir was trying to stem dissent and divisions inside his ruling party over an economic crisis, largely the result of disputes with Sudan that have prevented it exporting its lifeblood crude oil, and endemic corruption.
But the timing for the biggest shake-up since winning independence two years ago could not be worse as South Sudan grapples with multiple challenges - the confrontation over oil flows with its former civil war foe to the north, as well as escalating rebel and tribal violence.
State television cited a presidential decree saying Vice President Riek Machar had been sacked, and Machar's spokesman James Gatdet Dak confirmed this.
The decree also said Kiir had suspended Pagan Amum, Secretary General of the ruling Sudan People's Liberation Movement (SPLM) and South Sudan's top negotiator at talks with Sudan.
Machar had recently hinted in an interview that he might challenge Kiir for the SPLM leadership before the 2015 national elections, and Kiir had already stripped Machar of some his duties in April in what seemed to be a move to curb his profile.
The men were on opposing sides of a split within the SPLM during much of the 1983-2005 civil war with Khartoum.
Political analyst Andrea Mabior said Kiir had dismissed his cabinet to remove Kiir. "It's a way to fire the vice president. He can say, 'I have fired the whole cabinet' - not just the vice president," Mabior said.
Since the SPLM has no political rivals of any standing, the battle for leadership of the SPLM is effectively the race to be president.
Amum, for his part, had recently criticised Kiir for suspending two ministers in a fraud probe, according to local media. The decree said a party committee would investigate him.
No more details were immediately available. It was also not clear when Kiir would appoint a new cabinet. The ministries would be run for now by their under-secretaries, the decree said.
Barnaba Marial Benjamin, until now information minister, said he had only learned about his sacking from the evening television news. Amum, one of the most prominent officials abroad, also said he had been caught by surprise when Reuters reached him on his mobile phone.
"I don't have all elements at hand," he said, giving no more details of the evening's dramatic events.
Kiir also removed 17 police brigadiers. There were no signs of increased military presence in the capital Juba after the announcement. The army, an umbrella of former civil war militias, is the power broker in the African country.
Still, the United Nations and aid groups told their staff to stay indoors until furter notice, U.N. sources said.
Western diplomats fear a slide into instability for South Sudan where a government mostly made up of former guerrilla commanders has been unable to kickstart development. Basic services such as health and education are mostly provided by the United Nations.
Nhial Bol, editor of the independent Citizen TV, said Kiir had acted to end paralysis in his government. "Things have not been moving in the government because of this internal fighting over who is going to control the SPLM," he said.
Abraham Awolich, administrator at the Sudd Institute, a local think-tank, said the SPLM leadership was facing "irreconcilable differences" and divisions.
The economic situation is expected to worsen after Sudan said it would close cross-border oil pipelines unless the South stopped supporting rebels on Sudanese soil.
Landlocked South Sudan - which relies on the pipelines to export its oil - denies that accusation and has said it has started shutting down its oil production.
Juba's army also faces escalating tribal violence as well as fighting with a rebel group in Jonglei state, which has made it impossible to pursue oil exploration plans.
(Writing by Ulf Laessing; Editing by Kevin Liffey and Robin Pomeroy)