Mali's new interim civilian president took office Thursday, vowing to keep the chaotic country intact even after rebels declared an independent state in the north following a military coup three weeks ago.

Hours after handing over power to Dioncounda Traore, the junta also released about a dozen politicians who had been detained since the coup, including the country's foreign minister.

Traore, who heads the country's national assembly, is to serve as Mali's president for 40 days following an agreement between West African regional mediators and the leader of the junta that seized power last month.

Amid the political upheaval, separatist rebels in northern Mali declared an independent state that is larger than France. The power vacuum also has allowed an Islamic faction that wants to impose Shariah law in the area to flourish.

The crowd cheered at Thursday's inauguration after the military coup leader shook Traore's hand. The new interim president said he would "never negotiate about the partition of Mali."

"We won't hesitate to wage a total, relentless war to regain our territorial integrity and also to kick out of our country all these invaders who bring despair and misery," Traore said.

His swearing-in ceremony came as the United Nations expressed growing concern about reports of violence in the north, where fighters are divided between a secular group and an Islamist faction. Militants from al-Qaida's North Africa branch are also in the area.

The U.N. High Commissioner for Human Rights Navi Pillay said Thursday that the situation appeared to be deteriorating, with reports of civilians being killed, robbed, raped and forced to flee. Hospitals and medical facilities also apparently have been looted, she added.

"Reports also suggest that tensions between different ethnic groups are being stirred up, increasing the risk of sectarian violence," Pillay said. "In addition it seems that unveiled women have allegedly received threats and intimidation, and there are allegations that non-Muslims in the northern part of the country may have been deliberately targeted and killed by extremist religious groups."

Longtime Malian President Amadou Toumani Toure was just months from finishing his last term when soldiers on March 21 stormed the presidential palace, sending Toure into hiding and overturning a democratic tradition stretching back more than two decades. Toure emerged from hiding Sunday to render his official resignation.

The soldiers claimed they had grabbed power because Toure had mishandled the Tuareg rebellion that began in northern Mali in January. However, it was only after Toure was ousted that the Tuareg rebels succeeded in taking the three largest cities in the region and declared independence.

Under intense international pressure and regional financial sanctions, Mali's coup leaders signed an accord last Friday, agreeing to return the country to constitutional rule. However, questions remain about what will happen after the 40-day transitional period.

Regional mediators already have indicated they anticipate it will take longer to organize new elections, and the junta's leader indicated earlier this week that he intended to remain involved in the political process that follows.

Late Thursday, a relative of one of the politicians detained since the coup said the officials had been freed. The release was confirmed by Tiegoum Boubeye Maiga, the brother of one of the foreign minister who had been among those in custody. Others who had been detained after the coup included the ministers of justice and interior.

The new civilian president, who heads Mali's largest political party, has served as head of the national assembly since 2007. He became active in the union movements that were opposed to Mali's former dictator who was ousted in 1991. Dioncounda Traore held a number of senior political posts, including serving several terms as a minister.