South Sudan's president on Tuesday replaced his deputy and opposition leader Riek Machar, who fled into hiding this month amid renewed clashes with government forces. The move threatens an already fragile peace deal in a country ravaged by civil war.

President Salva Kiir installed a new first vice president, Taban Deng Gai, who had been mining minister in a coalition government formed in April. Taban also acted as the rebels' chief negotiator during peace talks.

The appointment raises fears of more fighting because most opposition generals and militia remain loyal to Machar.

A faction of the armed opposition on Saturday selected Taban to replace Machar, claiming that the coalition government could not function with Machar in hiding.

"The circumstances forced us to fill a vacancy so that we save our nation," Taban said in a speech following the swearing-in ceremony.

But loyalists to Machar are alleging a conspiracy to remove him. The appointment of Taban is "totally illegal," said Nyarji Roman, a spokesman for Machar's faction. Roman also accused the government of sending troops to hunt down Machar in his hiding place. Machar has said he would not return to Juba until an outside force, such as an intervention force proposed by the African Union, was put in place to restore calm to the capital.

Kiir, who had invited Machar to return to the capital, Juba, on Tuesday denied having a role in his ouster.

"Circles will take it that it is me in person ... who has really conspired for the removal of Dr. Riek Machar. It is not me," Kiir said after the ceremony.

The recent fighting killed hundreds and sent thousands fleeing. Security forces loyal to Kiir bombed Machar's house, and more than 30 of his bodyguards were killed.