* Machar calls for president to resign
* Says army has conducted campaign of ethnic cleansing
* Fighting has killed thousands, curbed oil production
* Demands release of remaining political detainees (Adds new quotes, details)
By Goran Tomasevic
JONGLEI STATE, South Sudan, Jan 31 (Reuters) - South Sudan rebel leader Riek Machar accused the government on Friday of ethnic cleansing and trying to sabotage peace talks, in his first face-to-face interview since fighting erupted late last year in Africa's youngest nation.
Dressed in dark green military fatigues and speaking to Reuters in his bush hideout, Machar branded President Salva Kiir a discredited leader who had lost the people's trust and should resign.
Thousands have been killed and more than half a million have fled their homes since fighting erupted in the capital Juba in mid-December and spread quickly across the oil-producing nation, often following ethnic lines.
The two sides signed a ceasefire on Jan. 23 in the Ethiopian capital Addis Ababa, but each has accused the other of breaking it.
"Salva Kiir has committed atrocities in Juba, he has engaged in ethnic cleansing and he is still involved in the process," Machar said.
His comments highlighted the gulf between the sides, who are meant to resume their troubled peace talks in Ethiopia next week. Regional and world powers are worried fighting could break out again and spill over into neighbouring states.
South Sudan's justice minister said this week that former vice president Machar and six of his closest allies should face treason charges, accusing him of trying to launch a coup.
"I am not aware of why we should face those charges for an alleged coup that never happened," Machar said. "(It) is another attempt to stop peace talks."
Machar has regularly denied starting the violence or trying to seize power, and has accused the president of taking advantage of an outburst of fighting between rival groups of soldiers to round up political rivals.
The United Nations and rights groups say both warring sides have committed atrocities, in a conflict that has taken the country to the brink of civil war. The government and rebels both accuse each other of ethnically motivated killings.
Human Rights Watch said earlier this month that government SPLA forces had targeted civilians from Machar's Nuer group in Juba early on in the conflict, while rebel forces had butchered members of Kiir's Dinka tribe in other towns.
GUNS AND LAUNDRY
In Machar's bush camp, hidden in the thorny scrub of South Sudan's vast Jonglei state which has untapped oil reserves, assault rifles stood propped up against a tree and laundry hung drying in the branches.
Nearby, Machar's wife Angelina Teny, a former mining and energy minister in the united Sudan before the South seceded in 2011, was typing on a laptop in front of her tent.
The rebel leader said Kiir had lost the support of the country's 11 million people. Asked what he wanted from the peace talks, Machar, who was sacked by Kiir in July, said he had no interest in being reinstated as vice president.
"It would be best for Kiir to resign. We are due for elections in 2015. Before the elections there would be an interim government," Machar said, declining to say who might lead it.
Machar blamed the army for the ceasefire violations. The army was, he said, battling to extend its control outside the towns of Malakal and Bentiu, near the country's main oil fields, and Bor, scene of some of the heaviest clashes.
Regional leaders said on Friday they aimed to deploy the first members of a team to monitor the shaky ceasefire at the weekend.
Even so, obstacles still lie in the way of the peace talks re-starting on time.
Four of the six senior political figures accused of treason alongside Machar are in detention in Juba. Machar pressed for their release after the government on Wednesday freed seven other detainees, but declined to say if he would call back his negotiators if the government refused.
"It will not be an inclusive peace process if they're not there. A non-inclusive process would hurt the people of Sudan," he said.
Machar said Kiir had only survived the uprising because Uganda's military had intervened. Uganda has admitted its army provided air and ground support to Kiir's troops, raising concerns among diplomats that the wider region could be sucked into the conflict.
"If it was not for the interference of the Ugandans, we would be in Juba now," Machar said.
Asked if that meant he would be in power, he replied: "Not necessarily, but Kiir wouldn't have been president." (Writing by Richard Lough; Editing by Mark Trevelyan)
Our Standards: The Thomson Reuters Trust Principles.