Juba - South Sudanese rebel leader Riek Machar was Monday briefly detained at Addis Ababa airport, a rebel spokesman said.

Machar had arrived in the Ethiopian capital from South Africa, where he had been staying since October 12.

The Ethiopian authorities thought he was passing through Addis Ababa to go to the rebel headquarters in Pagak on the South Sudanese side of the Ethiopian border, and denied him permission to travel there, spokesman Dickson Gatluak said from the Ethiopian capital by telephone.

In fact Machar was not heading for Pagak, Gatluak said, declining to disclose his destination.

It was not immediately possible to get confirmation from the Ethiopian authorities.

Machar came to South Africa for medical treatment after sustaining a leg injury while fleeing fighting between his troops and the army in South Sudan's capital Juba in July.

He had initially fled to Congo and moved on to Sudan's capital Khartoum.

Ethiopia was concerned that Machar's presence in Pagak could "foster clashes," Gatluak said.

A split between President Salva Kiir and his former deputy Machar escalated into a military conflict in December 2013, killing tens of thousands.

The conflict has displaced about 3 million people, according to figures published by the UN humanitarian agency OCHA on Monday. They comprise 1.9 million internally displaced people and 1.1 million who have fled to neighbouring countries, including 500,000 in Uganda.

Machar and Kiir signed a peace deal in August 2015 and formed a unity government in April, but that did not stop the fighting.