Syrian refugee Fawaz al-Jasem used to drop his tools and run when he saw police approaching the farm in northern Jordan where he has been picking vegetables for the past three years.

Now he works without fear of arrest.

He is among some 23,000 Syrians given work permits this year as part of Jordan's promise to the international community to put 50,000 refugees to work legally in 2016 in return for low-interest loans and easier access to European markets.

"Before we got work permits it was like we were in prison," said the 34-year-old al-Jasem, pulling weeds in a tomato field, a New York Yankees baseball cap shielding his face. "Now we are free to come and work as we wish."

Jordan's deal with donor countries, reached earlier this year, is aimed in part at deterring Syrians from moving on to Europe, as hundreds of thousands have done, and keeping them in the region with a promise of jobs and education for their children.

Jordan has made "significant progress" in meeting the target for employing Syrians, the European Union ambassador to the kingdom, Andrea Matteo Fontana, said last week.

But the new deal is bad news for foreign workers in Jordan who fear they will be squeezed out of an increasingly crowded labor market. There are an estimated 1 million foreigners working in Jordan, mostly as janitors, maids, construction workers and farm pickers.

As a first step, Jordan halted the influx of foreign workers and "started formalizing the Syrian labor that works in the informal sector," according to Planning Minister Imad Fakhoury.

"We will absorb the refugees and consider them as a surplus labor pool," said Fakhoury.

The deal on labor rights for refugees, known as the Jordan Compact, is an attempt to find longer-term solutions for the millions of Syrians who have been displaced since the civil war began in 2011. Close to 5 million have fled their homeland, settling mostly in neighboring Jordan, Turkey and Lebanon.

Jordan hosts more than 650,000 refugees, with about 80 percent living in communities, rather than refugee camps, and imposing a heavy burden on resources, including health care, schools and housing.

On Wednesday, Europe announced it has eased trade rules with Jordan to spur investment in the kingdom and create jobs for Syrian refugees. The new rules will allow a wider range of Jordanian products to be sold in Europe without tariffs. Eligible manufacturers must employ a certain percentage of Syrians.

Jordan would also receive internationally backed loans at comfortable terms, in part to finance labor intensive projects.

In exchange, Jordan dropped its opposition to labor rights for refugees, despite domestic unemployment of more than 14 percent and a continued economic slowdown.

Before the policy change, tens of thousands of Syrian refugees worked without permits that were too expensive or difficult to obtain. Cheap Syrian labor pushed down wages in certain sectors, such as construction and agriculture.

Under the new rules, Jordanian employers can obtain work permits for Syrian laborers free of charge during a six-month grace period that ends in September.

Refugees need a health certificate and an ID card issued by Jordan's Interior Ministry to be eligible for a permit. Nearly 200,000 refugees don't have such an ID card because of lack of passports or other supporting documents, according to the U.N. refugee agency.

For others, like farm worker al-Jasem, the new permit is a life changer.

Al-Jasem, a farmer in the Syrian city of Hama, fled to Jordan with his wife and two children in 2013, first to the Zaatari refugee camp, Jordan's largest for Syrians. He quickly left the camp, settling on the sprawling vegetable farm where he also found work.

The family sleeps in a plastic tent on the farm on the outskirts of the town of Ramtha, close to the border with Syria. Al-Jasem and his wife, who also received a permit, supplement their $1.40 an hour salaries with free farm food.

The farm employs close to 1,300 laborers — more than 700 from Pakistan, 300 from Syria and 270 from Egypt.

One of the Egyptians, Ahmed Abd El Hay, said he was upset when he heard about the freeze on new arrivals, though Jordanian officials said veteran foreign workers are not at risk of being forced to leave the country.

The International Labor Organization welcomed the freeze on newcomers.

Migrant workers should be protected, but "maybe we should not have more Egyptians enter Jordan because we have refugees who can do the work," said Maha Kataa of the ILO in Jordan.

Syrian refugees who are not eligible for the new program continue to live in fear.

Emad Abdullah, a Syrian refugee who works on another farm, said that after two years in Jordan, he still hasn't been able to get a government ID, the prerequisite for a work permit. Abdullah said he feared being sent to a camp or back to Syria.

"We only work on this two kilometer plot of land, we would not dare leave it," he said.