Like millions of Syrians, Wareef Hamedo fled the civil war in his homeland in search of safety and security. But in a decision he now regrets, he chose to go to Gaza.

Hamedo's family is among 12 Syrian households that found refuge in Gaza after the civil war erupted in 2011 and are now trapped in the war-battered territory, ineligible for most social services granted to Palestinians but also unable to travel abroad.

"We are trying to get out of Gaza to any European country or where a Syrian refugee can find care," said Hamedo, a chef from Aleppo who is an unofficial spokesman for the Syrian families here. "Gaza was a phase for the Syrians. We came to it because of the conditions that forced us to."

About 250 families from Palestinian refugee camps in Syria made their way to Gaza in the first two years of the Syrian civil war. As Palestinian refugees, they were eligible for services such as health care, education and food assistance from UNRWA, the U.N. agency that assists Palestinian refugees.

About two dozen Syrian families also chose to migrate to Gaza after initially fleeing to Egypt. As the situation in Egypt deteriorated, they entered neighboring Gaza through smuggling tunnels. Some managed to leave before the Egyptian army shut most of the tunnels in 2013. But half still remain.

Egypt closed the tunnels following the ouster of Islamist President Mohammed Morsi, who had been a close ally of Gaza's Hamas rulers. The loss of the tunnels, along with a devastating 50-day war with Israel in 2014, caused Gaza's economy to collapse. Unemployment has soared, and the cash-strapped Hamas government has failed to provide shelter for the Syrians.

"We got many promises, but nothing was made," Hamedo said.

While UNRWA serves Palestinian refugees, the main international body assisting displaced Syrians is the U.N. refugee agency, which has no offices in Gaza. The Palestinian territories also have no official Syrian diplomatic mission, so the families can't renew passports or register their newborns. And because they entered Gaza illegally through the tunnels, they have no way of exiting. With no legal status, work or aid, the Syrians can do little but wait for a miracle to leave.

Majed al-Attar wistfully recalled his life in Damascus, where he said he had a spacious home, two cars and a warehouse full of cement and building materials. His expired passport is full of Jordanian, Egyptian and Saudi stamps he collected in his business travels.

The house and its surroundings were hit from the air "and everything was wiped out," the 49-year-old said. So, he moved with his wife and child to Egypt in 2012.

In the run-up to the 2013 military overthrow of Morsi, things quickly deteriorated, and the options were to join migrants on "the death boats" to Europe or move to Gaza, he said. The second option seemed smarter since his wife is originally Palestinian and had relatives in the Gaza border town of Rafah.

In Gaza, al-Attar was displaced again during the 2014 war, when he had to flee bombing and sleep in U.N. school shelters for several weeks. "It was a disaster for us," he said.

Now unemployed, he cannot afford to buy kindergarten clothes for his son who was born here in 2014. The boy has no official documents or citizenship, only a hospital notification that shows his name and date of birth. Most of the money he earns as a day laborer goes to the rental of a half-finished, sparsely furnished apartment. His wife managed to qualify for some UNRWA benefits, including schooling for the boy, but most benefits are out of reach because al-Attar is not Palestinian.

"I regret coming here," he said. "We just hope to get out from here next month or the month after with my wife and children to live in dignity and freedom and with a secure future for them."

As Gaza struggles to rebuild damaged homes, over 11,200 families are still displaced after the 2014 war with Israel. That has made it even harder for the Syrian families to find adequate shelter.

Amer Foura's family, originally from the southwestern Syrian city of Deraa, has found shelter in a hospital.

His wife, Kholoud, a 39-year-old mother of five, has developed muscular dystrophy and is now hooked up to a respirator at Gaza's Al-Wafa hospital. Her husband and children sleep in beds and mattresses in her hospital room.

"I have lived in Al-Wafa hospital for about a year and a half," said the husband, who is unemployed. "My only home is Al-Wafa since it's able to provide and take care of me.

The Syrians scrape by with menial jobs and occasional donations from local charities.

Hamedo, the chef, is full of nostalgia, spending time daily flipping through pictures from his life in Aleppo, where he ran a restaurant called Café D'alep. He pointed to a photo of a blond woman. "This was my girlfriend. She died in an airstrike," he said.

He enjoyed some initial success in Gaza, opening a restaurant that enjoyed early popularity, but ultimately went out of business because of the weak economy, constant power outages and shortages of cooking gas. He has since married a local woman and last month, they had their first child, a girl.

"We just need to get the basics secured in our stay here," he said.