(CNN) Sudanese citizens took to the streets of the capital, Khartoum, Friday to celebrate a power-sharing agreement that could bring an end to a weeks-long standoff between the ruling Transitional Military Council and the opposition alliance.

Sudan's military leadership and the country's pro-democracy movement have agreed to form a rotating, joint sovereign council that will govern "for the next three years or a little longer," Mohamed el-Hassan Labat, the African Union's envoy to Sudan, said early Friday.

Under the agreement, the military council will be in charge of the country's leadership for the first 21 months. A civilian administration will rule the council during the following 18 months.

The joint sovereign council will consist of five members of the military and five civilians, in addition to one civilian chosen by consensus from both sides.

Photos: In pictures: Sudan in transition Sudanese civilians atop a train join in celebrations over the signing of a deal that paves the way for a transitional government in Khartoum, Sudan, on Saturday, August 17. Hide Caption 1 of 43 Photos: In pictures: Sudan in transition Sudanese protest leader Ahmad Rabie, center right, flashes the victory gesture alongside Gen. Abdel Fattah al-Burhan, the chief of Sudan's ruling Transitional Military Council, center left, during a ceremony where they signed a constitutional declaration. Hide Caption 2 of 43 Photos: In pictures: Sudan in transition Sudanese men embrace outside the Friendship Hall in Khartoum where generals and protest leaders signed a historic transitional constitution, paving the way for civilian rule in Sudan. Hide Caption 3 of 43 Photos: In pictures: Sudan in transition Sudanese protesters celebrate in the streets of the capital, Khartoum, after ruling generals and protest leaders announced they have reached an agreement on a new governing body Friday. Hide Caption 4 of 43 Photos: In pictures: Sudan in transition African Union envoy to Sudan Mohamed al-Hacen Lebatt, second from left, shakes hands with an army general following a press conference announcing an agreement was reached. Under the terms, the military council will be in charge of the country's leadership for the first 21 months. A civilian administration will rule the council during the following 18 months. Hide Caption 5 of 43 Photos: In pictures: Sudan in transition Relatives of three Sudanese men who were found dead with bullet wounds mourn near their bodies in the city of Omdurman on July 1. Hide Caption 6 of 43 Photos: In pictures: Sudan in transition Protesters run from a police van that drove through a crowd on June 30 in Khartoum. The protesters faced off with armed forces on a main road leading to the airport. Hide Caption 7 of 43 Photos: In pictures: Sudan in transition A protester reacts to tear gas on June 30. Hide Caption 8 of 43 Photos: In pictures: Sudan in transition Sudanese protesters march in a mass demonstration against the country's ruling generals in the capital's twin city of Omdurman on June 30. Hide Caption 9 of 43 Photos: In pictures: Sudan in transition Tear gas fumes are seen amid a demonstration in Khartoum on June 30. Hide Caption 10 of 43 Photos: In pictures: Sudan in transition People chant slogans as a young man recites a poem, illuminated by mobile phones on June 19. Hide Caption 11 of 43 Photos: In pictures: Sudan in transition Mohamed Hamdan Dagalo, deputy head of Sudan's ruling Transitional Military Council (TMC) and commander of the Rapid Support Forces (RSF) paramilitaries, center right, waves a baton as he rides through supporters in Qarri, north of Khartoum, on June 15. Hide Caption 12 of 43 Photos: In pictures: Sudan in transition Sudan's Transitional Military Council spokesman Shams-Eddin Kabashi, right, speaks during a press conference at the Presidential Palace in Khartoum on June 13. Sudan's ruling military council admitted that it had ordered the dispersal of a Khartoum sit-in, which left more than 100 dead. Hide Caption 13 of 43 Photos: In pictures: Sudan in transition Protesters block a street with bricks and burning tires as military forces attempt to disperse a sit-in outside the army headquarters in Khartoum, Sudan, on Monday, June 3. More than 100 protesters were killed when the military opened fire to break up the sit-in, according to a local doctors' union. Hide Caption 14 of 43 Photos: In pictures: Sudan in transition Sudanese forces are deployed around Khartoum's army headquarters on June 3. Hide Caption 15 of 43 Photos: In pictures: Sudan in transition Protesters gather for a sit-in outside the military headquarters in Khartoum on May 19. Hide Caption 16 of 43 Photos: In pictures: Sudan in transition Gen. Mohammed Hamdan Dagalo, the deputy head of the military council that assumed power in Sudan, prays during a Ramadan event in Khartoum on May 18. Hide Caption 17 of 43 Photos: In pictures: Sudan in transition Sudanese army soldiers gather as people rally in front of the Presidential Palace in downtown Khartoum on May 18. Hide Caption 18 of 43 Photos: In pictures: Sudan in transition Protesters wave national flags at a sit-in outside the military headquarters in Khartoum on May 2. Hide Caption 19 of 43 Photos: In pictures: Sudan in transition Demonstrators attend Friday prayers outside the army headquarters on April 19. Hide Caption 20 of 43 Photos: In pictures: Sudan in transition Protesters shout slogans as they carry a soldier flashing the victory sign outside the army headquarters on April 18. Hide Caption 21 of 43 Photos: In pictures: Sudan in transition Protesters participate in a sit-in in Khartoum on April 17. Hide Caption 22 of 43 Photos: In pictures: Sudan in transition Demonstrators rally near the military headquarters in Khartoum on April 15. Hide Caption 23 of 43 Photos: In pictures: Sudan in transition Lt. Gen. Omar Zain al-Abdin, head of the Sudanese military council's political committee, addresses journalists in Khartoum on April 12, one day after Bashir was ousted. Hide Caption 24 of 43 Photos: In pictures: Sudan in transition Demonstrators cheer on April 11, after an announcement that Bashir had been detained "in a safe place." Hide Caption 25 of 43 Photos: In pictures: Sudan in transition A protester kisses a soldier on the head during a rally in Khartoum on April 11. Hide Caption 26 of 43 Photos: In pictures: Sudan in transition Protesters cheer outside the Defense Ministry in Khartoum on April 11. They were demanding that Bashir step down. Hide Caption 27 of 43 Photos: In pictures: Sudan in transition Sudan's defense minister goes on television April 11 to say Bashir's government has been dissolved. Hide Caption 28 of 43 Photos: In pictures: Sudan in transition Demonstrators stand on a military vehicle April 11 as they cheer and flash the sign of victory. Hide Caption 29 of 43 Photos: In pictures: Sudan in transition A billboard in Khartoum bears an image of Alaa Salah, a Sudanese woman who became the face of anti-government demonstrations. Hide Caption 30 of 43 Photos: In pictures: Sudan in transition Demonstrators block the vehicle of a military officer on April 11. Hide Caption 31 of 43 Photos: In pictures: Sudan in transition Demonstrators chant slogans as they gather in a street in central Khartoum. Hide Caption 32 of 43 Photos: In pictures: Sudan in transition Salah, the woman propelled to internet fame after clips of her leading protest chants went viral, addresses protesters on April 10. Hide Caption 33 of 43 Photos: In pictures: Sudan in transition Sudanese soldiers transport a body near the military headquarters on Tuesday, April 9. The Central Committee of Sudan Doctors said 22 people, including five soldiers, had been killed in mass protests. Hide Caption 34 of 43 Photos: In pictures: Sudan in transition A person writes "Down with Bashir" during an April 9 demonstration in Khartoum. Hide Caption 35 of 43 Photos: In pictures: Sudan in transition People protest on April 8, in front of the military headquarters in Khartoum. Hide Caption 36 of 43 Photos: In pictures: Sudan in transition A protester shows bullet cartridges during an April 8 demonstration. Hide Caption 37 of 43 Photos: In pictures: Sudan in transition Protesters sit atop a military vehicle as soldiers stand nearby on April 7. Hide Caption 38 of 43 Photos: In pictures: Sudan in transition Protesters run for cover on April 6, as tear-gas canisters are fired by police. Hide Caption 39 of 43 Photos: In pictures: Sudan in transition A protester retreats from tear gas during an anti-government demonstration on February 24. Hide Caption 40 of 43 Photos: In pictures: Sudan in transition A protester carries a Bashir portrait on February 8. It reads, "Down and that is all." Hide Caption 41 of 43 Photos: In pictures: Sudan in transition People take part in an anti-government demonstration in Omdurman, Sudan, on January 29. Hide Caption 42 of 43 Photos: In pictures: Sudan in transition A protester is seen in the midst of tear gas during clashes with security forces in Khartoum in December 2018. Hide Caption 43 of 43

"Today our revolution has won and it waves the flags of victory," the opposition Declaration of Freedom and Change Forces (DFCF) said Friday.

Read More