AMMAN, Jordan — On a busy thoroughfare in Amman, Jordan’s capital, a coffee seller named Mohammed Al Mulki no longer shivers when he sees a police car pull up. At a nearby sweet shop, the counterman, Zuheir Taleb, no longer slips out of the back when a uniformed official walks in.

And in the country’s north, on scorching fields a few miles from the Syrian border, Badra Hadahed, a diabetic grandmother doing backbreaking work, no longer worries that she will be plucked from the cucumber fields and sent back to her home.

Like many Syrians who fled their country’s civil war, all three had been working illegally in Jordan. But under a shrewd, delicate experiment that grew out of Europe’s desire to contain the influx of foreigners to its shores, Jordan has been persuaded to let these Syrians make an honest living — in return for potentially big financial rewards.

Jordan, which has 650,000 Syrian refugees registered with the United Nations inside its borders, has long made it nearly impossible for them to work legally, citing concerns about high unemployment among its citizens. But under the new experiment, the government has given out 13,000 work permits to Syrians, and is promising to issue up to 50,000 by year’s end — and tens of thousands more in the future.