A South African judge has ordered authorities to prevent Sudanese President Omar al-Bashir from leaving the country after the International Criminal Court called for him to be arrested at an African Union summit there. "President Omar al-Bashir of Sudan is prohibited from leaving the Republic of South Africa until the final order is made in this application," Judge Hans Fabricius said in his ruling. Sudan's State Minister for Foreign Affairs Kamal Ismail said Bashir would return home after the main session of the summit. Despite calls for his arrest, Sudan’s president looked relaxed and confident as he lined up with other African heads of state for a group picture at the AU summit. But around him, a firestorm is brewing. ICC arrest warrant President Omar al-Bashir is the target of an arrest warrant by the International Criminal Court. He has been indicted for crimes against humanity and genocide in the western Darfur region of Sudan. South Africa is a member state of the international court and so, legal experts argue, the nation is obliged to arrest him. Institute of Security Studies managing director Anton du Plessis says he agrees with the prominent South African and international groups that have demanded Bashir’s arrest. “The South African government is arguing that the immunity provision agreement that it has with the AU means that it does not need to comply with its obligations under the Rome Statute of the Security Council to arrest him," he said. "Our view on that is that it is incorrect, and that in fact the obligations are very much still in place and that South Africa does have an obligation to arrest and hand President Bashir over. That is also the opinion of the International Criminal Court, which last night the pre-trial chamber issued a very clear order which clarifies this position.” But there were no manacles on the president as he lined up and chatted with South African President Jacob Zuma and Zimbabwean President Robert Mugabe. Instead, Bashir stood in the front row of the group photo, smiled and flashed a thumbs-up sign. Bashir’s situation is far from stable. On Sunday, a South African court issued an urgent interdiction to bar him from leaving South Africa until the court hears the appeal calling for his arrest. But it is not clear how that will be enforced. The Sudanese president reportedly entered, like many other African heads of state here for the summit, on an official plane that landed at a South African air force base in the capital, Pretoria. South Africa's delicate position South Africa’s president previously said, in 2009, that he will call for Bashir’s arrest if he enters South Africa. Du Plessis says this affair reflects badly on South Africa. “What it does say about South Africa is that although our government is taking a particular position on this, we still have a very robust civil society, we still have a very independent independent judiciary, and I hope that by the end of this the message will be clear that you can not just be alleged of committing these crimes and just come to South Africa and no one says anything,” he said. The African Union has previously argued the court is biased against African nations. Author David Hoile says he agrees with this position. “What the AU should do, certainly en masse or bilaterally, is actually leave the ICC," he said. "It is a dysfunctional court. It is not working properly and I think it is irretrievably flawed. With regards to what South Africa should do, again I think this is actually pretty clear. In terms of the U.N. Vienna Convention on diplomatic immunity, any sitting head of state has sovereign immunity.” Bashir appears to be in that situation within the plush halls of the AU Summit. But what happens once he leaves these doors is anyone’s guess.