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.
The International Criminal Court said it was "disappointed" at the failure to arrest Bashir, who had been in Johannesburg for an African Union summit overshadowed by the ICC's demand for his detention 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 urgent application to force the authorities to arrest him.
The ICC's chief deputy prosecutor James Stewart said the international court was "disappointed that he was not arrested. Our position has always been that South Africa's obligation is clear and unequivocal. It had an obligation to arrest him," he said.
After Bashir had departed, South African Judge Dunstan Mlambo also issued a harsh criticism of the government for ignoring Sunday's court order that authorities must stop the president from exiting the country.
"The conduct of the respondents — to the extent that they have failed to take steps to arrest and detain (Bashir) — is inconsistent with the constitution of the Republic of South Africa," Mlambo said.
President Bashir's hurried exit on the final day of the summit sparked anger from rights groups.
"By allowing this shameful flight, the South African government has disregarded not only its international legal obligations, but its own courts," Human Rights Watch said in a statement.
"When (Bashir) took off from South Africa today, he took with him the hopes of thousands of victims of grave crimes in Darfur who wish at last to see justice done."
South Africa is a signatory of the ICC, which has often been criticized for only targeting Africa leaders.
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.
Mugabe has previously urged all African leaders to pull out of the ICC.
"President Bashir's plane took off from Johannesburg and will arrive around 6:30 pm (1530 GMT)," Sudan's State Minister for Information Yasir Yousef said in Khartoum.
"Bashir will address the crowds that will gather to meet him."
Sudanese officials in Johannesburg 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 marginalization.
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.
"It's an embarrassment for South Africa," said Jakkie Cilliers, of the Institute for Security Studies think-tank.
"South Africa has created a difficult situation for itself. My feeling is that by allowing him in they wanted to demonstrate to the world a common position of Africa on the ICC."
The South African government and African Union made no immediate comment on Bashir's exit or the court order, which was obtained by the Southern African Litigation Centre, a legal rights group.
The European Union had earlier issued a statement saying it "expects South Africa ... (to act) in executing the arrest warrant against any ICC indictee present in the country."
Before Bashir left South Africa, UN chief Ban Ki-moon said, "The International Criminal Court's warrant ... is a matter I take extremely seriously and the authority of the ICC must be respected."