A South African judge on Sunday ordered authorities to prevent Sudanese President Omar al-Bashir, who is in South Africa for an African Union summit, from leaving the country because of an international order for his arrest, human rights activists said.

Al-Bashir appeared for a group photo with other African leaders at the summit in Johannesburg on Sunday, wearing a blue three-piece suit, a tie and a smile as cameras flashed.

Earlier Sunday, a South African judge ordered authorities to prevent al-Bashir from leaving South Africa because he is wanted by the International Criminal Court, human rights activists said Sunday.

The judge ordered the South African government to ensure that officials at all border posts enforce the court's decision, according to Caroline James, a lawyer with the Southern Africa Litigation Centre, a human rights group. The court is expected to rule on Monday if al-Bashir should be handed over to the International Criminal Court to face charges of alleged genocide and human rights abuses.

Sudan's foreign minister says al-Bashir not at risk

Kamal Ismail, the Sudanese state minister for foreign affairs, told reporters in Khartoum that al-Bashir had received assurances from the South African government prior to his visit that he would be welcome and was expected to return to Sudan on schedule.

He said the court order preventing al-Bashir from leaving South Africa "has nothing to do with the reality on the ground there," adding that "until now things are normal, and there is no threat to the life of the president of the republic."

The African National Congress, which is South Africa's ruling party, said the South African government granted immunity "for all (summit) participants as part of the international norms for countries hosting such gathering of the AU or even the United Nations."

"It is on this basis, amongst others, that the ANC calls upon government to challenge the order now being brought to compel the South African government to detain President al-Bashir," the ANC said, adding that African and Eastern European countries "continue to unjustifiably bear the brunt of the decisions of the ICC."

African Union won't compel arrest

Even before Sunday's events, the African Union had asked the International Criminal Court to stop proceedings against sitting presidents and said it will not compel any member states to arrest a leader on behalf of the court.

Al-Bashir has traveled abroad before, and local authorities had not detained him at the behest of the ICC, which is based in The Hague, Netherlands.

The Southern Africa Litigation Centre, a rights group, said it secured a judge's ruling that the government must stop al-Bashir from leaving South Africa while the court hears arguments for his arrest for alleged genocide and other crimes.

International Criminal Court prosecutor Fatou Bensouda has said South Africa is under a legal obligation to arrest al-Bashir and surrender him to the court. Her office has been in touch with South African authorities on the Sudanese president's reported visit.

If al-Bashir is not arrested, the matter will be reported to the court's assembly of states and the United Nations Security Council, which first referred the case of Sudan's Darfur region to the International Criminal Court in 2005, she said.

300,000 died in Darfur conflict

The charges against al-Bashir, who took power in a 1989 coup, stem from reported atrocities in the conflict in Darfur, in which 300,000 people were killed and two million displaced in the government's campaign, according to United Nations figures.

He has visited Malawi, Kenya, Chad and Congo in the last few years, all of which are ICC member states. The ICC doesn't have any powers to compel countries to arrest him and can only tell them they have a legal obligation to do it.

In March, the ICC halted proceedings against Kenyan President Uhuru Kenyatta after the prosecution said it did not have enough evidence against him. Kenyatta, who is attending the summit, was charged in 2011 as an "indirect co-perpetrator" in post-election violence that left more than 1,000 people dead in 2007 and 2008. He always maintained his innocence.

Kenyan deputy president William Ruto is on trial for crimes against humanity in the election-related violence.