Former parliament speaker Dioncounda Traore took over as Mali's interim president on Thursday from the leaders of last month's coup, promising to hold elections and fight rebels occupying half the country.

Traore, 70, a labour activist turned politician, was sworn in by Supreme Court President Nouhoum Tapily in the capital Bamako as part of a deal to restore civilian rule after army officers staged a March 22 coup in the West African state.

The coup shattered predominantly Muslim Mali's image as one of the most peaceful and stable states in the region.

Triggered by army anger over the previous civilian government's failure to tackle a Tuareg-led rebellion in the north, it backfired spectacularly, allowing the rebels to advance and declare a northern separatist homeland. Al Qaeda-linked Islamist fighters are among the occupying rebels.

With residents and U.N. rights experts reporting killings, rapes and looting on the rise in rebel-seized northern towns, there are fears of the vast northern territory becoming a lawless and destabilising rogue state in West Africa.

We will never negotiate the partition of Mali, Traore said at his inauguration. He promised to organise free and transparent elections over the whole of the national territory.

Former President Amadou Toumani Toure, deposed by last month's coup, resigned to facilitate the transition deal. The military junta also released Toure's former foreign minister and other cabinet members it had held in custody since the coup.

I am president of a country that loves peace, Traore said, wearing the presidential sash over a dark suit. But he acknowledged he was the leader of a nation cut in two.

He called on the rebels to pull back from the northern towns they occupied, which include the desert trading post and seat of Islamic learning Timbuktu and the garrison town of Gao.

We prefer peace, but if war is the only way out, we will wage it, Traore said. Long live Mali, one and indivisible!

He said the effort to recover Mali's territorial integrity would expel invaders bringing desolation and misery which he identified as al Qaeda, drug-traffickers and hostage-takers.

COLLAPSED STATE

But there were no immediate signs that Mali's army, weakened by the putsch, was readying any significant offensive against the rebels, whose ranks were swelled by arms and Tuareg soldiers who had served slain Libyan leader Muammar Gaddafi.

The 15-state ECOWAS grouping of West African countries, which pressured the Bamako coup leaders to give up power, is preparing an intervention force of up to 3,000 troops. But it has said its mandate is to prevent further rebel advances rather than win back lost territory. Former colonial power France has offered logistical support but not troops.

In Geneva, U.N. Secretary-General Ban Ki-moon welcomed what he called the constitutional restoration in Mali and said he was discussing with West African leaders how to deal with the rebel-occupied north.

We sincerely hope this will be resolved as quickly as possible so that the Malian people will really enjoy their genuine freedom and stability and also development, he said.

The African Union also welcomed the restoration of a civilian president, while ordinary Malians seemed relieved.

He has to show what he is capable of, said Bamako resident Youssouf Ndiaye.

Traore is not expected to have enough time to organise credible elections in the 40 days allotted to him by the constitution.

Tiebile Drame, head of PARENA, one of the Malian political parties that led opposition to the coup, said talks between Malian political actors were expected in Burkina Faso over the weekend. It was hoped this could lead to the naming of a prime minister over the weekend and a government next week.

But Drame saw little prospect of quick progress on the military front against the rebels. Everybody knows it is not possible to conduct a war in 40 days, especially with the state of our army, he said. We are a collapsed state.

CIVILIANS KILLED, ROBBED, RAPED

U.N. human rights chief Navi Pillay condemned reported violations being committed against civilians after the coup and rebel advance. She said the situation risked worsening a grave humanitarian crisis already affecting the drought-plagued Sahel region, now awash with refugees.

Reports from the north of the country suggest that civilians have been killed, robbed, raped and forced to flee, Pillay said in a statement released by her office in Geneva.

There have been reports of Islamist rebels seeking to apply sharia, Islamic law, among the local population, shutting down bars and ordering women to cover their heads. Other reports have spoken of looting and gun-toting, turban-wearing fighters roaming the streets, forcing many non-Tuaregs to flee the north.

Pillay said human rights violations, including illegal arrests, poor conditions of detention and attempts to restrict the right to freedom of expression, have also been reported in Bamako in the wake of the military takeover.

Separatist leaders have declared a secular Tuareg homeland of Azawad in an area bigger than France in northern Mali - a secession bid so far snubbed by the world.

The separatist rebels have distanced themselves from their Islamist comrades-in-arms, who say they want to apply sharia across all of Mali.

(Additional reporting by Adama Diarra in Bamako and Stephanie Nebehay in Geneva; Writing by Pascal Fletcher and Mark John; Editing by Myra MacDonald)