Somali refugees look through a barbwire fence of a United Nations World Food Programme (WFP) distribution centre during a food distribution exercise in Dagahale, one of several refugee settlements in Dadaab on 8 October 2013 Siegfried Modola/Reuters

Closing Kenya's refugee camp in Dadaab, on the border with Somalia, could result in vulnerable people being recruited by terror groups such as al-Shabaab, a security analyst has told IBTimes UK. Kenyan authorities have been trying to close the camp – one of the largest in the world, hosting more than 300,000 people – and repatriate Somali refugees.

The government claims claim militants from the Somalia-based al-Shabab group operate in Dadaab. However, some believe that closing the camp – not keeping it open – will result in vulnerable refugees being recruited by terror groups.

Critics also argue that vulnerable Somali refugees cannot be repatriate given the high level of instability in their country, marred by terror attacks and a drought that is pushing the East African nation on the verge of a devastating famine.

On 9 February, Kenya's high court said in a ruling hailed as historic by rights groups, that forcibly repatriating refugees was anti-constitutional and amounted to "group persecution".

However, Kenya intends to appeal against the ruling with a spokesperson for the government saying that closing the camp was a matter of "national security".

"The camp had lost its humanitarian nature and had become a haven for terrorism and other illegal activities. For us as government, Kenya will always come first. The lives of Kenyans matter," read a statement shared on social media.

"Our interest in this case, and in the closure of Dadaab refugee camp, remains to protect the lives of Kenyans. It is for this reason that we will be strongly appealing the decision by the High Court."

David Otto, security analyst and counterterrorism expert at UK-based TGS Intelligence Consultants, believes that closing the camp will result in vulnerable refugees "falling into the hands of groups like Shabaab."

The Islamist outfit, affiliated with both al-Qaeda and Islamic State (Isis, Daesh), often targets Kenya in retaliation for the Linda Nchi military operation, which saw the deployment of Kenyan troops to Somalia to drive out the militants in 2011.

"Al-Shabaab may have infiltrated the camp and recruited within, but this is the responsibility of the host nation to ensure that such avenues and drivers within the camp are minimised," Otto told IBTimes UK.

"If the government had succeeded to close the camp, it would have been victory for groups like Shabaab. What the state has to do is to employ practical mechanisms to ensure that the refugees don't become attracted to terrorist groups. It's about creating a better alternative," he continued.

"We've seen the same infiltration happening in Internally Displaced People (IDP) camps in northern Nigeria. How many camps will you close? It doesn't matter if they are refugees or Idps. What matters is that they are vulnerable persons," Otto concluded.