South Sudan president replaces rival as vice president
President Salva Kiir installed a new first vice president, Taban Deng Gai, who had been mining minister in a coalition government formed in April.
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. Nyarji Roman, a spokesman for Machar's faction, called the appointment of Taban "totally illegal."
Kiir, who had invited Machar to return to the capital, Juba, on Tuesday denied having a role in his ouster.
"Some will take it that it is me in person ... who has conspired for the removal of Dr Riek Machar. It is not me," Kiir said after the ceremony.
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.
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.