Sudanese rebel groups have criticised a power-sharing deal between the military and the country's pro-democracy movement aimed at ending weeks-long political deadlock. The protest leaders in the capital, Khartoum, and the ruling military on Friday made public an agreement to form a joint government. A faction of the Sudan Liberation Movement, led by Minni Minnawi, said late on Friday that a peace deal had to be reached with rebel groups before embarking on the planned transition. Another faction of the movement, led by Abdel Wahid Al Nur, slammed the deal as a "betrayal of the revolution". The group, then fighting an insurgency in the Darfur region, split into rival factions in 2004. Mr Minnawi has joined a political coalition with the protesters, while Mr Al Nur refused to take part. The criticism is at odds with the jubilation that spread among protesters in Khartoum after the announcement of the deal. Crowds of Sudanese took to the streets on Friday to celebrate the landmark deal between protest leaders and the country's ruling generals aimed at turning the page on months of political unrest. The power-sharing deal, reached in the early hours after two days of hard-won talks brokered by Ethiopian and African Union mediators, came after previous negotiations collapsed in May over who should lead the new body, a civilian or soldier. "The two sides agreed on establishing a sovereign council with a rotating military and civilian presidency for three years or a little more," African Union mediator Mohamed Lebatt said. Sudan has been gripped by political deadlock since the generals removed longtime president Omar Al Bashir in a coup in April after months of mass national protests. Gen Mohamed Dagalo, the ruling military council's deputy, stressed the deal "does not exclude anyone". The group that launched demonstrations against Mr Al Bashir in December hailed the agreement. "Today, our revolution has become victorious and our victory shines," the Sudanese Professionals Association said. The deal is due to be finalised on Monday. It revived hopes for a peaceful transition of power in a country plagued by internal conflicts and years of economic crisis that helped to trigger the overthrow of Mr Al Bashir in April. The protests have been led by the Forces for Freedom and Change alliance. Many were initially unaware of the details of the deal because of an internet cut ordered by the military last month, and the alliance was holding public meetings on Friday evening to spread the news. Alliance member Mervat Al Neel said it had been told the internet would be restored in coming days after "security checks". UN Secretary General Antonio Guterres said on Friday he was encouraged by the power-sharing deal. Mr Guterres encouraged “all stakeholders to ensure the timely, inclusive and transparent implementation of the agreement and resolve any outstanding issues through dialogue". The EU on Friday hailed the deal as a breakthrough. "The agreement reached by the Transitional Military Council and the Forces for Freedom and Change in Sudan on a three-year civilian-led transition, as announced by the African Union, is a breakthrough," a spokesman for EU foreign policy chief Federica Mogherini said. "The efforts of the African Union and Ethiopian mediation have played a crucial role in facilitating the two sides reaching an agreement." But the spokesman stressed the need for the quick formation of a civilian government. "It is important that the parties implement the agreement reached in good faith and also continue talks on outstanding issues," he said. "A competent and empowered civilian government that can restore peace, deliver economic prosperity and protect the human rights of all in Sudan should be formed promptly." The EU said it would be ready to engage with such a government on ways to support the transition. The US also welcomed the agreement. "The agreement between the Forces for Freedom and Change and the Transitional Military Council to establish a sovereign council is an important step forward," the State Department said. It said the US special envoy for Sudan, Donald Booth, would return to the region soon.