OUAGADOUGOU, Burkina Faso (AP) — Mali, which lost half its territory last year to a rebel invasion, signed an accord Tuesday with Tuareg separatists who still control the country's northernmost province, paving the way for the Malian military to return to the areas that remain under rebel control.

The agreement, which was signed in front of reporters by two Tuareg representatives and an emissary of the Malian government in Ouagadougou, where the two sides have been holding talks, calls for a cease-fire to go into effect immediately.

"I call on you to rise to the occasion and see to it that the components of this accord are applied correctly," said Burkina Faso President Blaise Compaore, who mediated the talks.

A draft of the agreement seen by The Associated Press also says a commission will be set up including four members each from the rebel group and from the Malian security forces, and five members from the international actors engaged in resolving the Malian conflict, including French, African and U.N. forces.

The commission will be tasked with determining how the rebels will be disarmed, how they will be transferred to a site where they can be garrisoned, and the steps that will be taken to allow Mali's military to return to the occupied area.

Mali's security forces will return to Kidal, the capital of the occupied province in northern Mali, which has become a de facto Tuareg state, before the July 28 presidential election, according to the agreement. The deployment will start with a unit of gendarmes and police, followed by a progressive deployment of Mali's military, in close collaboration with African and United Nations forces.

Malian politician Tiebile Drame, the representative of the Malian government at the talks, said they have overcome the greatest differences.

"I think we can say that the biggest task is finished. We have agreed on the essentials. There is an international consensus as well as a Malian consensus on the fundamental questions, which include the integrity of our territory, national unity, and the secular and republican nature of our state," he said.

According to Drame, the rebel National Movement for the Liberation of the Azawad, or NMLA, agreed that Mali would exercise its sovereignty "over every centimeter of its territory" and that the Malian military will be allowed to return to Kidal.

Moussa Ag Attaher, a spokesman for the NMLA, said the Tuareg separatists are on board: "The NMLA and the High Council for the Azawad have given everything for peace and so we accept this accord."

It's unclear how quickly Mali's army will be allowed to return to Kidal, and whether a significant contingent will be in place before the upcoming election. The talks had reached an impasse last week over a number of issues, including the speed of the army's deployment and whether or not rebels who committed atrocities during the invasion would face trial.

The traditionally nomadic Tuareg people, who consider northern Mali their hereditary homeland, have long agitated for their own nation. To that end, Tuareg rebels have picked up arms against the state many times as far back as the 1960s. The NMLA, founded in late 2011, is the most recent movement claiming greater autonomy for Mali's Tuaregs. They began inching into northern Mali in early 2012, taking a string of small towns and villages.

After an unexpected coup in Bamako, Mali's distant capital, in March of 2012, they took advantage of the ensuing chaos to push into the major cities in the north, taking Kidal, Timbuktu and Gao in the seizure of what amounted to a France-sized territory.

But on their coattails came a trio of rebel groups allied with al-Qaida, and within weeks the jihadists had yanked down the NMLA flags and replaced it with their own dark symbol, proclaiming that the only God is Allah. The Islamic extremists set to work creating their own Islamic state, imposing Shariah rule, flogging women for dressing immodestly, shuttering bars and discotheques, and banning music and soccer.

In punishments that shocked the normally moderate Islamic nation, they amputated the hands of more than a dozen thieves, sentenced to death one accused murderer who was publicly shot, and stoned to death an adulterous couple.

In January, France scrambled fighter jets over Mali in order to beat the Islamic radicals back, flushing out the extremists from the three major towns in the north. While the Malian army was quickly able to return to Timbuktu and Gao, it did not immediately return to Kidal, a Tuareg stronghold. The French are accused of standing by and allowing the NMLA to re-enter Kidal, where they quickly established a shadow administration.

As the Malian military advanced on Kidal last month, many feared a clash. The hastily-convened talks in Ouagadougou aimed to avoid a direct confrontation.

It's not the first time that the warring sides have met in Burkina Faso's capital, which has become the de facto home-away-from-home for rebels in conflict with Mali's government.

A spokesman representing both the NMLA and the smaller High Council of the Azawad, which represents a different Tuareg faction, said he hopes this is the last time they need to fly to Ouagadougou.

"This time I pray with all my heart that this is the accord that will stick, because there have been too many agreements that were simply not respected," said Mohamadou Maiga.


Callimachi contributed from Dakar, Senegal. Associated Press writer Baba Ahmed contributed from Bamako, Mali.