Nobel laureate Malala Yousafzai has celebrated her 19th birthday by visiting the world's largest refugee camp.

The teenager, who has campaigned on girls' rights after militants shot her in 2012 while she returned home from school in Pakistan, expressed concern that Kenya's plans to close the Dadaab camp within the year could create a lost generation.

Malala was responding to the Kenyan government's announcement in May that it plans to close the camp by the end of the year.

The advocate for girls' education said any return of the more than 300,000 refugees to neighbouring Somalia, which remains in the grip of extremist attacks, should be voluntary only.

She said: "They should not be forced to move.

"As we all know, the camp is going to be closed down soon, so I want to make sure that these girls don't become a generation lost and there are alternative facilities for them to continue with their education."

Malala warned if the camp closes and the girls move to Somalia where there are few schools, they "will be without education", pointing out that in Dadaab, they have access to lessons.

Malala urged Kenyan president Uhuru Kenyatta to take his time in deciding on the camp closure and to take into consideration the need to provide schooling for the girls.

Mr Kenyatta said repatriations from Dadaab, which has existed for 25 years, will be voluntary and carried out in a humane way. The international community has urged caution and warned against forceful evictions.

Many of Dadaab's refugees have lived most if not all of their lives in the sprawling camp, which is a vast settlement of established homes and newcomers' huts constructed from thorn branches and other materials.

Malala explained that on each birthday she chooses a region where girls' education is neglected and needs attention.

"I am here to speak for my unheard sisters of Somalia striving for education every day," she said.

Since last year, she has been in contact via Skype with a group of girls in Dadaab and had been looking forward to meeting them and others, said Taylor Royle, her spokesman.

Malala won the 2014 Nobel Peace Prize following her recovery after the 2012 shooting in Pakistan, where she is an outspoken advocate for girls' education in a highly conservative culture.

The possibility that Dadaab camp in eastern Kenya, near the border with Somalia, will be closed brings yet more uncertainty to the refugees. Kenya's government believes Dadaab has become a security liability.

The government also claims attacks on Kenya by the Somali extremist group al-Shabab were planned and facilitated in the camp.

Al-Shabab has carried out numerous attacks in Kenya which have killed scores since 2011, when Kenya deployed troops to Somalia against the militants.

Al-Shabab, which is linked to al-Qaida, has vowed to continue attacking Kenya.