DADAAB, Kenya — Nobel laureate Malala Yousafzai visited the world's largest refugee camp on her 19th birthday Tuesday and voiced concern that Kenya's plans to close it could create "a generation lost."

The government announced in May that it plans to close the camp in eastern Kenya near the Somali border by the end of the year, citing it as a security liability.

Malala said returning any of the more than 300,000 refugees to Somalia, which is still plagued by extremist violence, should be voluntary.

"They should not be forced to move," the advocate for girls' education said in an interview with the Associated Press.

"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 said.

If the camp is closed and its residents are moved to Somalia where there are few schools, the "girls will be without education," she said, noting that at least they can get an education in the schools inside Dadaab.

The outspoken advocate for the education of girls in her native Pakistan was shot in the head and severely wounded in 2012 by Taliban militants while returning home from school. For her courage, she was awarded the Nobel Peace Prize in 2014.

Malala urged President Uhuru Kenyatta to take his time in deciding on the fate of the camp and take into consideration the need to provide education.

Dadaab has existed for 25 years, and for many of the refugees there, the sprawling camp is the only home they have known. There are established houses for longtime residents, while newcomers make do with improvised huts of thorn branches and other materials.

One refugee, Rahma Hussein, said that when her family returned to Somalia, "things changed dramatically. There was no peace, there was no security, and even if you go to learning centers you fear that when and which time you will be bombed."

Kenya has been plagued by numerous attacks from the Somali extremist group al-Shabab that have killed scores of people since 2011, when Kenya deployed troops to Somalia against the militants. The Kenyan government alleges that attacks were hatched in Dadaab. Al-Qaida-linked al-Shabab has vowed to continue attacking Kenya.

Kenyatta has said repatriations from Dadaab will be voluntary and humane. The international community has urged caution and warned against forceful evictions.

U.N. security in the camp on Tuesday did not allow the media to speak with refugees other than the ones who met with Malala.

Malala said she came to the camp to draw attention to the global refugee crisis, saying that each year on her birthday, she chooses a region where girls' education is neglected.

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

Since last year, Malala 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 spokeswoman.

Malala embraced refugee girls who came out in large numbers to see her. Some wore bright red scarves marked with Malala's name. She walked hand-in-hand with them in the dry and dusty camp.