The Dadaab refugee complex, near the Kenya-Somalia border. Thomas Mukoya/Reuters Juliet Okoth, University of Nairobi The world has become a hostile place for refugees. The narrative often used to justify such actions is national security. The cornerstone of international refugee law is the principle of non-refoulement. This obliges states not to turn away individuals who have a well-founded fear of persecution, or substantial grounds to believe that if returned to a particular country they would be in danger of torture, inhuman or degrading treatment. What then happens where an individual is considered a security threat to a state they wish to gain access to? Is that state still obliged to accept the individual, or to continue hosting them? This is a dilemma for countries that host refugees. Kenya is no stranger to this struggle. Situated in a conflict-prone zone it’s hosted hundreds of thousands of refugees from a range of countries including Somalia, South Sudan, the Democratic Republic of Congo and Ethiopia.This benevolence has become a particular challenge with the rise of terrorist attacks. The most shocking were the Westgate Mall attack in 2013 and the Garissa university attack in 2015. They were carried out by Al-Shabaab, a terrorist group based in Somalia. The government used the attacks to justify the closure of the Dadaab refugee camp and to revoke the prima facie status of Somali refugees. Kenya’s High Court delivered a judgment that effectively puts a stop to the government’s plans. I believe that the judgment was correct and balanced. And that the government has other options it should explore to protect its citizens while protecting vulnerable refugees and asylum seekers.The case of DadaabKenya’s National Commission of Human Rights and Kituo cha Sheria (Legal Advice Centre), with the support of Amnesty International, filed a petition in the High Court challenging the legality of Dadaab’s closure. The petition’s main argument was that the revocation of refugee status of Somali refugees was discriminatory, unlawful and unreasonable. It argued that the directive, which subjected asylum seekers and refugees to forceful repatriation through the closure of camps, was punitive and a breach of the state’s obligation under the principle of non-refoulement. The state justified its actions saying the circumstances which gave rise to refugee status no longer existed in Somalia. It also argued that justifiable challenges had emerged making Kenya unable to continue hosting refugees. These challenges includedovercrowding in the camps, terrorist attacks, huge economic costs, human trafficking, proliferation of arms, strained government resources and insecurity.But the court declared that the decision to target Somali refugees specifically was illegal, discriminatory, unconstitutional and an act of group persecution. It also declared the decision to collectively repatriate refugees in the Dadaab complex a violation of the principle of non-refoulement.Balancing national security and protectionGovernment concerns on security are legitimate. Nonetheless, the fight against terrorism must take place within the framework of international law. This requires states to ensure national security while complying with their international obligations to the protection of refugees.The 1951 Refugee Convention recognises exceptions to the non-refoulement principle, including a state’s right to protect its citizens. But the Kenyan court observed that given the seriousness of expulsionsuch a decision should involve a careful examination of the question of proportionality between the danger to the security of the community or the gravity of the crime and the persecution feared. The court took exception to the government’s blanket condemnation of all refugees in the Dadaab complex. It determined that the application of the exception to non-refoulement required individualised determination, and only as a last resort. The court recognised, however, that the government had an obligation to protect Kenya’s territorial integrity and sovereignty. Way forward for Kenya?The court’s decision effectively brings the government’s plans to repatriate Somali refugees to an end. The government says it will appeal.Kenya could still explore its options to repatriate but within its obligation under international law. This means that refugees can only be returned to their country of origin if the circumstances that contributed to their plight have ceased. It’s doubtful that Somalia is now a completely safe country for the refugees to return to.So, what are the government’s options?The government has the machinery to ensure the safety of its citizens and foreigners within its borders. This means it has the capacity to investigate and to prosecute anyone assisting terrorist organisations such as Al-Shabaab. It can also improve its screening function to ensure that those granted refugee status are not terrorists. The government could still explore the possibility of repatriating the refugees on a voluntary basis while re-engaging the parties to the tripartite agreement to develop a comprehensive plan that will take into account the prevailing circumstances in Somalia. It can also engage with the international community for more financial and humanitarian support to lessen the economic burden of hosting refugees.The decision by the High Court has restored the dignity of the refugees hosted in Kenya. Their vulnerability shouldn’t be used to exploit them but should instead be a reason to give them the protection they deserve.Juliet Okoth, Lecturer, International Law, University of NairobiThis article was originally published on The Conversation. Read the original article.