A South African court has issued an interim order preventing Sudanese President Omar al-Bashir from leaving the country.
It says Mr Bashir will have to stay until the court hears an application later on Sunday on whether he should be handed over to the International Criminal Court (ICC) in The Hague.
Mr Bashir is in Johannesburg for an African Union (AU) summit.
He faces ICC war crimes and genocide charges over the Darfur conflict.
The ICC has called on South Africa to arrest him. However he was welcomed by South African officials when he arrived in Johannesburg on Sunday.
There are tensions between the ICC and the AU, with some on the continent accusing the court of unfairly targeting Africans.
The AU has previously urged the ICC to stop proceedings against sitting leaders.
The warrants against Mr Bashir, who denies the allegations, have severely restricted his overseas travel. He has, however, visited friendly states in Africa and the Middle East.
The ICC has issued two arrest warrants against Mr Bashir. The court relies on member states to carry out arrests.
However correspondents have said the South African government – a signatory to the treaty establishing the ICC – is unlikely to move against the Sudanese leader.
The AU has previously refused to co-operate with the ICC, accusing it of bias against African leaders.
Human rights organizations and South Africa’s main opposition party have also called for Mr Bashir’s arrest.
Darfur has been in conflict since 2003, when rebels took up arms against the government. The UN says more than 300,000 people have died, mostly from disease.
The Johannesburg summit is chaired by Zimbabwean President Robert Mugabe, who holds the rotating presidency of the AU. The official theme is Year of Women’s Empowerment and Development.
But the political turmoil in Burundi, crisis in South Sudan and the recent spate of xenophobic attacks in South Africa are also likely to feature heavily.