Two rebel groups that seized northern Mali two months ago have agreed to merge and turn their territory into an Islamist state, both sides say.
The Tuareg MNLA, a secular rebel group, and the Islamist group Ansar Dine signed the deal in the town of Gao, spokespeople said.
Ansar Dine, which has ties to al-Qaeda, has already begun to impose Sharia law in some towns.
The groups took advantage of a coup in March to seize the territory.
Correspondents say the deal is yet another worrying development for Mali and may complicate efforts to stabilise the country.
Capt Amadou Sanogo seized power in March after claiming the then president, Amadou Toumani Toure, was not doing enough to quash the rebellion.
Faced with mounting international pressure and sanctions, he was forced to step down only three weeks later, but is still thought to wield power behind the scenes.
"It is true that an accord has been signed," Col Bouna Ag Attayoub, a MNLA commander in Timbuktu, told the BBC. "The Islamic Republic of Azawad is now an independent sovereign state."
Previously, the MNLA had remained secular, resisting Ansar Dine's efforts to impose Islamic law in towns. Meanwhile, Ansar Dine had rejected the MNLA's call for an independent state.
Residents said there was celebratory gunfire in Gao and Timbuktu after the agreement.
More than 300,000 people have fled northern Mali since the rebels took the territory in the days following the coup.
Regional bloc Ecowas has said it is preparing to send 3,000 troops to Mali to help the country reclaim its northern territory, but no date has been set for the force to arrive.
Mali's interim president, Dioncounda Traore, is receiving medical tests in France after being beaten unconscious by protesters who supported the coup.
It is thought that soldiers allowed the demonstrators into Mr Traore's office, which is next to the presidential palace. Ecowas has warned of sanctions if the military are found to be involved.