Sudanese President Omar al-Bashir flew out of South Africa on Monday, dodging a court order for him to stay as judges weighed up whether he should be arrested over alleged war crimes and genocide.
Bashir had traveled to Johannesburg for an African Union summit that was overshadowed by the International Criminal Court (ICC) calling for him to be detained on long-standing arrest warrants over the Darfur conflict.
Even as his plane took off from Waterkloof military airport outside Pretoria, the local high court heard legal arguments over the application to force the authorities to arrest him.
On Sunday, Judge Hans Fabricius ordered authorities to stop Bashir from leaving the country after the Southern African Litigation Centre, a legal rights group, lodged its urgent case.
The president's hurried exit from South Africa appeared to be a violation of the court order, and it immediately sparked anger from rights' groups.
"(The) world stood (with) South Africa to fight apartheid but it stands for impunity for mass murder of Africans," Kenneth Roth, director of Human Rights Watch, said on Twitter.
"South Africa has shamefully flouted ICC and domestic court to free man wanted for mass murder of Africans," he added.
South Africa is a signatory of the ICC, which has often been criticised for only targeting Africa leaders.
"President Bashir's plane took off from Johannesburg and will arrive around 6:30 pm (1530 GMT)," State Minister for Information Yasir Yousef told AFP in Khartoum.
"Bashir will address the crowds that will gather to meet him."
At the summit, Bashir attended a group photograph on Sunday along with South African host President Jacob Zuma and Zimbabwe's President Robert Mugabe, who is the chair of the 54-member group.
Monday is the closing day of the summit.
Sudan officials in Johannesburg had earlier brushed off the court case and said the South African government had given them assurances about Bashir's trip before the summit.
The ICC indictments relate to the western Sudanese region of Darfur, which erupted into conflict in 2003 when black insurgents launched a campaign against Bashir's Arab-dominated government, complaining of marginalisation.
Khartoum unleashed a bloody counter-insurgency using the armed forces and allied militia.
The United Nations says 300,000 people have been killed in the conflict and another 2.5 million forced to flee their homes.
Khartoum, however, disputes the figures, estimating the death toll at no more than 10,000.
The ICC had called on South Africa "to spare no effort in ensuring the execution of the arrest warrants" against Bashir, 71, who seized power in Sudan in an Islamist-backed coup in 1989.
The South African government and African Union made no immediate comment on Bashir's exit.
The European Union had issued a statement saying it "expects South Africa... (to act) in executing the arrest warrant against any ICC indictee present in the country."
The United States, which is not a participant in the ICC, said it "strongly support(ed) international efforts to hold accountable those responsible for genocide, crimes against humanity and war crimes."