Families gathered around a refrigerated truck at a Syrian-Turkish border post, waiting earlier this month for the drivers to dispense their awful cargo: the bodies of 52 Syrian men, killed in a war 600 miles away, the Washington Post reported.

The dead were mercenaries, recruited by Turkish-backed militias in Syria to fight on behalf of Azerbaijan against Armenia, relatives said. They were deployed as shock troops, to claw back scraps of territory in Nagorno-Karabakh.

“They went to break the borders,” said a cousin of Mahmoud Najjar, a 38-year-old Syrian fighter whose body in the cold truck was marked with the number 12.

The deaths of Syrian fighters have raised alarms about how this decades-old conflict could now rapidly worsen as it draws in outside powers like Turkey and its rival Russia and potentially destabilizes neighbors like Iran and Georgia.

Turkey has denied sending Syrian fighters to aid Azerbaijan, its longtime ally. But relatives of two fighters — Najjar and his nephew — said in interviews that monthly salaries were promised by the Turkish-supported militias and that the fighters flew to Azerbaijan from southern Turkey.

In recent months, Turkey has sought to project its military might across much of its neighborhood with new vigor. Turkey’s enthusiastic backing of the Azerbaijani war effort — and provision of military assistance, including armed drones — has emboldened Azerbaijan, situating Turkey at the center of the conflict and giving Ankara standing, it hopes, to weigh in on any peace settlement.

The latest fighting, which began September 27, represents the worst flare-up in decades.

The deployment of Syrian mercenaries has repeated a pattern from Libya, where Turkey and Russia are fighting on opposite sides of the civil war. Most of the Syrian fighters in Libya have been hired by Turkey, which sponsors militias inside Syria opposed to the government of Syrian President Bashar al-Assad. A Kremlin-backed security firm operating in Libya, for its part, has brought over Syrian fighters allied with Assad.

Turkish officials have portrayed their country’s sprawling foreign engagements — in northern Iraq, Syria, Libya and Azerbaijan — as part of Turkey’s zealous promotion of its security and energy interests. [Turkish President Recep Tayyip] Erdogan’s critics, however, say there is also an attempt to distract from his government’s domestic vulnerabilities, including a plummeting economy, and shore up domestic support among his nationalist allies.

Russian President Vladimir Putin’s government has given mixed signals about whether it will intervene, saying that Russia would fulfill its treaty obligations to defend Armenia proper but that its obligations did not extend to fighting in Nagorno-Karabakh.

Moscow’s strongest words so far have been to condemn Azerbaijan’s use of Syrian mercenaries. Russia’s foreign intelligence chief, Sergei Naryshkin, warned last week that the region could become a launchpad for Islamist militants to enter Russia.

The Syrian mercenaries, recruited from various Turkish-backed militias, have given detailed accounts from the front lines that portray a grinding battle.

Mahmoud Najjar’s cousin said he and his family received updates on the fighting from Syrians traveling with Najjar’s company who had international phone lines.

Najjar, who once worked in a textile factory in Aleppo, had more recently been employed as a security guard for the local court in Marea, in northern Syria. With two children and struggling to make ends meet, he noticed when other young Syrian men, recruited by Turkey to fight in Libya, came home flush with cash. When Najjar’s 18-year-old nephew offered him the opportunity to fight in Azerbaijan for $2,000 a month, he jumped at the chance, his cousin said.

“Money is the only reason,” the cousin said. “Who wants to go to Azerbaijan? Who even knows where Azerbaijan is?”

Najjar, his nephew and dozens of their comrades seemed unprepared for what was to come.

They flew out of southern Turkey, the cousin said. On their first day in Azerbaijan, they were given uniforms with light green shades of camouflage.

The next day, they were sent to the front. “The area was heavily fortified by Armenians,” the cousin said. The Syrian mercenaries were largely on their own in an unfamiliar place, surrounded by languages, history and grievances they did not understand. They were accompanied by three Azerbaijani guides.

They spent nine hours walking up a mountain, the cousin said. Najjar was sent to clear a building but was killed by a sniper’s bullet that tore off the top of his head, according to the cousin, who provided a picture of Najjar’s body to The Washington Post on the condition that it not be published. Najjar’s nephew was killed the same day.