BAMAKO, Mali (AP) — Rebel groups in Mali's north have agreed on a preliminary plan to confine their members to barracks.

Armed groups and the government have signed an initial plan, during U.N.-led talks in Bamako, to create nearly 40 barracks around Timbuktu, Gao and Kidal.

The Associated Press Wednesday saw a copy of the document.

Ambeiri Ag Rhissa of the Tuareg National Movement for the Liberation of Azawad said this was the beginning of a solution.

The U.N. said it would continue to lead talks.

Tuareg rebels launched a rebellion in 2012 that led to a military coup, allowing them to take control of the north. However, al-Qaida-linked Islamic extremists later took over much of the north, prompting France to launch a military intervention in early 2013.

Attacks continue in north Mali.