Updated

Sudan said Tuesday it is hosting South Sudan's former rebel leader and vice president, whose whereabouts had been unknown after he fled his country into neighboring Congo last week.

Riek Machar needed "urgent medical attention," government spokesman Ahmed Bilal Osman said in a statement carried by the SUNA news agency. He said Machar's condition was now stable and that he would stay "until he leaves the country for a destination of his choice to complete his medical treatment."

Machar fled South Sudan's capital last month amid renewed fighting, just months after he returned to the country to resume being vice president under a peace deal signed last year under international pressure.

Many of his bodyguards were shot dead in the July fighting that erupted outside the presidential compound where Machar and former rival President Salva Kiir were meeting on recent tensions.

His absence has further weakened the already fragile peace deal, with Kiir quickly replacing Machar as vice president in a contested move.

Osman, the Sudan government spokesman, said Machar had been received "recently" in Sudan but did not give details on when or how he entered the country. He said Sudan accepted Machar for "purely humanitarian reasons" and promptly notified neighboring South Sudan's government.

Sudan's foreign ministry spokesman had told The Associated Press on Saturday that Machar was not there.

Last week, a spokesman for Machar announced that he had fled across the border into Congo after weeks of walking through the bush. The United Nations said it had arranged for its peacekeeping mission in Congo to fly Machar to a safe place away from the Congo-South Sudan border and that Machar was in the hands of Congolese authorities.

But Congo's government last week said it had no knowledge of Machar being there.

It was not immediately clear whether Machar had plans to emerge from his treatment in Sudan to speak publicly.

South Sudan's civil war began in December 2013 between armed supporters of rivals Kiir and Machar. Tens of thousands have been killed and more than 900,000 have fled the world's youngest country, which was founded in 2011 after years of fighting for independence from Sudan.