South Sudan's former vice president and opposition leader Riek Machar has left the country for a neighbouring state, opposition officials said, several weeks after he withdrew from the capital Juba during fierce fighting with government troops.

Spokesman James Gatdet Dak on Thursday declined to disclose Machar's whereabouts. A statement issued by the leadership of the SPLA In Opposition said he had left on Wednesday to a "safe country within the region".

A Machar aide said later on Thursday that the former vice president was in the capital of the Democratic Republic of Congo (DRC).

"Riek Machar is currently in DRC, in Kinshasa, and wants to go as soon as possible to Ethiopia," the official told the  AFP news agency.

READ MORE: South Sudan's ever-deepening cycle of violence

Machar led a two-year rebellion against forces loyal to his longtime rival President Salva Kiir before the two sides reached a peace deal in August 2015. Under the deal, Machar returned to Juba in April to resume his role as vice president.

Al Jazeera’s exclusive interview with Riek Machar in South Sudan

But fighting flared last month, leading Machar to withdraw with his forces from Juba around mid-July.

Spokesman Gatdet Dak, writing on his Facebook page, said opposition fighters had "successfully relocated our leader to a neighbouring country where he will now have unhindered access to the rest of the world and the media".

Since the outbreak of fighting in July, Kiir has sacked Machar from his post and appointed Taban Deng Gai, a former opposition negotiator who broke ranks with Machar, as vice president.

The United Nations told Kiir that any political changes must be consistent with the peace deal, which stated that the vice president must be chosen by the South Sudan Armed Opposition. 

READ MORE: South Sudan humanitarian situation could worsen: UN

Last week, the UN Security Council approved the deployment of an additional 4,000-strong peacekeeping force in South Sudan, after the July infighting threatened to send the country back to all-out civil war.

UN role divides opinion in South Sudan

South Sudan initially rejected the resolution, claiming it "seriously undermines" its sovereignty, but later softened its stance.

South Sudan's President Kiir told Al Jazeera on Sunday that it had not yet closed the door on a UN protection force.

Ateny Wek Ateny, presidential spokesman, said the government will accept the force, but only if it can negotiate its size, mandate, weapons and the contributing countries.

The civil war in South Sudan began in December 2013 when government forces loyal to President Kiir, an ethnic Dinka, battled rebels led by Machar, a Nuer.

Tens of thousands of people were killed in the fighting and more than two million people were displaced.

Source: Al Jazeera and agencies