For only the second time in the U.N. Human Rights Council's 17-year history, it has been left without a president at the start of the year and the issue will go to a secret ballot.
It is a rare public dispute in the African group whose turn it is to lead the 47-member council. It normally strives to take decisions as a bloc.
Diplomats say the result is too close to call for the annual presidency — a prestigious but mostly symbolic post that can help turbo-charge the political careers of ambassadors.
Morocco claims sovereignty over Western Sahara, where the Algeria-backed Polisario Front is seeking independence. It has denied allegations of rights abuses against its opponents there.
As part of a broader strategy, Morocco has been courting countries, including African neighbors, to build up support for its policies for the former Spanish territory.
But it has not won over South Africa which helped to organize an event to promote self-determination for the Sahrawi people in Geneva last year.
South Africa's ambassador Mxolisi Nkosi told Reuters that its record of overcoming apartheid and its reputation as a bridge-builder made it a strong candidate.
In contrast, he said Morocco was the "antithesis of what the council stands for."
"For a country with all these challenges to aspire to be the face of Human Rights Council and, God forbid if they get elected, this will shatter whatever shred of legitimacy this council ever had."
Morocco's diplomatic mission did not respond to a request for comment. Supporters of its candidate Omar Zniber said it had received African Union backing.
The council meets several times a year in Geneva. It is the only intergovernmental global body to protect human rights worldwide and can increase scrutiny of countries' human rights records and authorize probes.