South Sudan’s President Salva Kiir has removed Riek Machar as first vice president, two weeks after the rival leaders’ forces clashed in the capital.
Mr Machar has not been seen since the clashes, which left 300 people dead and threatened to revive a civil war that has killed tens of thousands.
The replacement was criticised by Mr Machar’s supporters – but others in his party are said to have supported it.
The BBC’s correspondent in Nairobi, Alastair Leithead, said the move has complicated an already tense political situation.
He said there were fears that Mr Machar’s supporters might claim that a peace deal with President Kiir had been broken.
This could plunge the country back into civil war – unless a majority of opposition politicians decided to back the new appointment.
During the clashes in early July, Mr Machar’s forces were outgunned by forces loyal to the president, and many of his bodyguards were killed.
The rebel leader left the capital, Juba, demanding the deployment of a neutral peacekeeping force that would guarantee his safety.
Mr Machar also sacked Mr Gai as mining minister just over a week ago, according to the AFP news agency.
However, scores of other members of Mr Machar’s party came out in support of Mr Gai, nominating him as interim vice president in Mr Machar’s absence.
Mr Gai has reportedly said that he would step down if Mr Machar returned to Juba and helped “bring peace to South Sudan”.
South Sudan became independent from Sudan in 2011 but its short history has been marred by civil war.
The international community played a major role in the creation of South Sudan and has tried to exercise some influence since independence in 2011.
The UN and US had demanded an immediate end to the fighting in July, a call echoed by the East African regional group which brokered a recent peace deal.