Congo-Brazzaville has been chosen to head the African Union, after Sudan withdrew its bid for the leadership at the AU summit in Khartoum.
Sudan's leadership of the AU was too much for some to stomach
AU members did not reach consensus on the presidency, some fearing that Sudan's human rights record would harm the union's reputation.
A compromise solution was reached whereby Sudan is expected to succeed Congo in the AU presidency in 2007.
AU leaders also ruled out extraditing ex-dictator Hissene Habre to Belgium.
Belgium wants to extradite the former Chadian president from exile in Senegal to face atrocities charges.
Senegal had asked the AU to rule on the case, but instead the leaders called for the creation of a panel of legal experts to review the case and present options at their next summit on how to deal with Mr Habre.
Sudan was previously the only country that had announced its candidacy to be AU chairman.
Congo's troubled history
1960: Independence from France
1992: Multi-party democracy
1993: Ethnic fighting erupts
1997: Full-scale civil war
1999: Peace accord
2002: Denis Sassou-Nguesso bars opponents from polls
2002: Clashes with 'Ninja' rebels
2003: Peace accord
2006: Ninja activity continues
Congolese President Denis Sassou-Nguesso has now taken over the chair of the Khartoum summit.
Critics of the compromise questioned how Sudan could be allowed to chair the union in 2007, if it was not a suitable candidate in 2006.
"It's a half-step in the right direction," Human Rights Watch spokesman and delegate Reed Brody told AFP news agency.
The BBC's Adam Mynott in Khartoum says that while Sudan's bid for the chairmanship had support in north and east Africa, there was discontent from governments in the south and west, as well as from human rights groups.
One southern African diplomat told our correspondent that it was not credible for Africa to be headed by Sudan for the coming year when the Darfur crisis remained out of control.
Sudanese minister Deng Alor, who hails from the south, told AFP that Sudan was given a clear message by the AU.
"If you put your house in order, we will have no problem with you - I think that is what we are going to do. We are going to put our house in order, solve our problems so that come 2007 we take the lead."
The compromise was devised by a seven-country committee, which was appointed to resolve the impasse after Sudan said it was prepared to drop its bid to chair the AU to avoid splits within the organisation.
"We don't want to make any cracks. If that means Sudan should withdraw, we will," Sudanese presidential adviser Mustafa Osman Ismail said ahead of the deal.
Traditionally, the host of the 53-nation AU summit takes over in the chair.
But human rights groups opposed a Sudanese AU presidency, citing the crisis over Sudan's Darfur region and allegations that Khartoum-backed militias have been involved in murder, rape and other atrocities.
More than 200,000 people have been killed in Darfur in the past three years, and two million people have been forced from their homes.
Rebels from the Darfur region had said they would pull out of peace talks if Sudan took over at the AU.