AMMAN - Jordanian Islamist Ahmad Mahmoud fought with rebels in Syria for six weeks earlier this year, then slipped back across the border to seek treatment for a war wound - even though the authorities had warned him not to return.
Within a week the bearded 23-year-old fighter found himself in the dock at a military court, facing terrorism charges filed by authorities who are taking an increasingly tough stance against homegrown militants fighting in Syria's civil war.
Their rising numbers have rattled the Hashemite kingdom, a US ally against Islamist militancy. Amman treats returning jihadists as a security threat to be nipped in the bud and, with an eye to Syrian President Bashar Assad's potential to tough out the uprising against him, wants to keep channels open to a government with which it retains diplomatic and trade ties.
Three years into Syria's civil war a growing number of Jordanian jihadists are coming home, some disillusioned by infighting within rebel ranks, others seeking a break from a draining and largely inconclusive conflict.
Up to a few months ago, Jordanian authorities were more discriminating with returning fighters, sometimes freeing "first-time offenders" who were deemed misguided after expressing regret for their actions.
Now, every detained returnee is whisked straight to court, although none have been accused of plotting attacks in Jordan.
Charge sheets against defendants highlight Amman's continued pragmatic recognition of Assad's rule. Many are accused of committing "acts not authorized by the state that sour relations with legitimate Syrian authorities", and face jail terms of 2 1/2 to five years after speedy military trials with minimal legal safeguards, according to defense lawyers.
The fact Mahmoud's father voluntarily informed officials that he was back in Jordan did not prevent a summons from hospital, where he was awaiting surgery on his injured knee, and detention by security services.
"His father handed him over with his son's consent before a hospital operation, after he phoned intelligence officials, who asked to bring him over immediately," Mahmoud's lawyer, Ayatollah Freihat, said.
The returnees vary from youths like Mahmoud, moved by video footage of indiscriminate shelling of population centers in rebel areas by Assad's forces, to others radicalized by hardline Sunni Muslim clerics calling for holy war and an Islamic state.
"I allowed you to go, but don't come back," said a Jordanian judicial source, starkly summarizing the official attitude towards those who enter combat in Jordan's northern neighbor.
"We turned a blind eye to you going, but if you return we will catch you and lock you up," said the source, who is familiar with the policy of Jordan's intelligence services and spoke on condition of requested anonymity.
Other countries ranging from Britain and France to Saudi Arabia and Morocco have grown alarmed about security risks posed by citizens returning from stints as militant fighters in Syria
Saudi Arabia, the world's No. 1 oil exporter and another strategic ally of Washington, has banned its nationals from fighting abroad, donating money to any faction in Syria or sympathizing with militant creeds.
In a reminder of Amman's jitters about the destabilizing effects of the Syrian war, Jordanian warplanes hit and destroyed several vehicles trying to cross the border from Syria on Wednesday. A Jordanian security source said the targets appeared to have been armed Syrian rebels seeking refuge from fighting with government forces in southern Syria.
Jordanian Islamists say hundreds of volunteers have entered Syria's conflagration since 2011. Salafis share the austere Sunni Islamist ideology of many Syrian rebels fighting Assad, who is from Alawite minority and backed by Shi'ite Muslim Iran.
Mohammed Shalabi, a Jordanian Salafi leader who has spent a decade in prison for security offenses, has encouraged militants to go and fight in Syria but said the earlier official stance of tacit tolerance had ended.
"In the last month or so they are refusing to allow anyone (re-enter) except in the most exceptional circumstances," which might include humanitarian grounds, said Shalabi, who is better known as Abu Sayyaf.
Returning fighters picked up at the frontier end up on a fast track to military trials where, rights groups say, testimonies are usually taken under coercion and torture.
At one session of his trial last month, the wheelchair-bound Mahmoud watched from the dock as his lawyer Freihat grilled the intelligence officer who had obtained his confession.
"I cannot remember if he was in pain or not when I asked him what happened," the officer told Judge Ahmed Qatarneh.
Officials provide no numbers for Jordanians now on trial for fighting in Syria but lawyers say there are at least 120 active cases, and the spike in prosecutions has overwhelmed the courts.
At a single-story state security building in eastern Amman's Marka district, the shortage of courtrooms has forced judges to hold trials in their own offices, one lawyer said.
FEAR OF ISLAMIST VICTORY IN SYRIA
Jordan's approach to militants fighting across the border sets it apart from Syria's other neighbors.
Turkey, which openly supports the anti-Assad insurgency, allows rebels to move back and forth between parts of northern Syria they hold and Turkish territory.
Iraq and Lebanon, with poorly defined borders and mixed Sunni and Shi'ite populations, have not stopped fighters from both sides of the sectarian divide from joining the Syrian war.
But Jordan's Western-aligned monarchy is torn by conflicting interests over Syria. It has tried to steer a middle course between that of Gulf Arab allies who want Assad ousted at almost any cost and its own concerns - echoed by Washington - that a radical Islamist victory in Syria would install a worse threat.
That ambivalence means that while Jordan has hosted small-scale US training of rebels
and allowed modest quantities of Gulf-supplied arms to filter into Syria, it ensured the border did not turn into an easy conduit for guns and fighters.
Salafi sources say more than 250 Jordanians have died in Syria, a relatively small number in a conflict which has killed more than 150,000 people since it erupted in March 2011.
But Amman is anxious to forestall any danger from the return of battle-hardened radicals. It has applied the same anti-terrorism laws used against militants who fought in Iraq after the 2003 U.S. invasion or who have tried to attack Israel, with which Amman signed a peace treaty nearly 20 years ago.
"You go to die? That's OK," said Taher Nasser, a lawyer who defends Islamist fighters. "But if you return, (the state) will teach you a lesson."
Jordan's wing of the Muslim Brotherhood backs the anti-Assad insurgency but has stopped short of urging Jordanians to join it, careful not to jeopardize its status as the country's mainstream opposition group and advocate of democratic reforms.
Human rights groups say that while systematic torture in Jordanian prisons has diminished, jihadists are kept in separate wings in small isolated groups under more spartan conditions where access to lawyers and family is tightly restricted.
"Jordan has gone a long way in reforming prisons and clearing up regular instances of systematic ill treatment and torture that went on for years. But we continue to hear ill treatment concerns about Salafi jihadi detainees," said Adam Coogle, a researcher with U.S.-based Human Rights Watch.
Outside prison, jihadists complain that their living conditions are scarcely any better. Abu Bakr, 21, recently freed after he was jailed for trying to cross into Syria, says his every move is tracked by vigilant security forces.
"I don't know what my future is. They can arbitrarily re-arrest me and I cannot work. They have circulated my name," he said while walking through Rusaifa, a densely populated working-class city where poverty and alienation have provided fertile ground for jihadi recruiters.
"As an Islamist jihadist you are not allowed to be treated as a human being," he said.
Another Salafi leader, Sheikh Saad Hunaiti, said the crackdown would further antagonize Salafis, three years after they took to the streets during the wave of Arab world unrest.
"Now they are gagging our mouths and arresting us. This will only increase hatred towards the regime," said Hunaiti.
Jordan has avoided the explosions of violence suffered by Syria's other Arab neighbors, Iraq and Lebanon. But Amman's clampdown carries the risk of sowing deeper radicalization among disaffected Salafis who see Jordan as part of Bilad al-Sham, or "Greater Syria" - another battlefield in their campaign to restore a medieval-era Islamic caliphate across the region.
"There are clear Koranic verses (about) Bilad al-Sham," Abu Sayyaf said. "We hope we will reap the fruits of efforts, and the blood that has been shed to see the caliphate (return)."