ADDIS ABABA - African nations are giving priority to finding a peaceful political solution to the problem of divided Mali but are preparing for a military intervention as a last resort, the African Union's top peace and security official said on Friday. AU heads of state meeting in Addis Ababa this weekend will discuss Mali, where a mix of al Qaeda-linked local and foreign jihadists are controlling the north of the largely desert Sahel state after hijacking a rebellion by secular Tuareg separatists earlier this year. AU Peace and Security Commissioner Ramtane Lamamra told reporters: "I think there is room for negotiations and room for moving to reconcile Malians among themselves." He said teams from the AU and West African regional grouping ECOWAS were working to prepare for military intervention but it would be "a last resort". French Foreign Minister Laurent Fabius on Thursday said a military operation by African nations with Western backing in Mali was likely "at one moment or another". Islamist fighters in northern Mali have tightened their control over the main cities of Timbuktu, Gao and Kidal and their regions after forcing out the secular Tuareg separatist group MNLA that had spearheaded the rebellion. The UN Security Council on July 5 endorsed West African efforts to end unrest in Mali but stopped short of backing military intervention until the details were given. Lamamra said talks were underway to try to form a representative, inclusive government in the southern Malian capital Bamako to restore stability after the March coup that triggered the northern rebellion and division of the country. African governments were pursuing dialogue too with some of the northern rebels to try to restore Mali's territorial integrity. "Hopefully you will not have to resort to the military option if the political solution helps to achieve our goal which is the preservation of national unity," Lamamra said. But Lamamra said "terrorist organizations" like al Qaeda and its North African franchise AQIM would not be part of any talks. Witnesses have reported seeing AQIM fighters with the rebels in northern Mali. "No one is negotiating with AQIM," Lamamra said.