A Russian soldier stands guard as a military helicopter takes off at an airport near Deir al-Zour, Syria, on Sept. 15, 2017. (AP)

Russia on Thursday raised the threat of a direct confrontation with U.S. forces in ­Syria, saying that it would target areas occupied by American units and U.S.-backed militias if its troops came under fire.

The warning was issued amid rising tensions in the Syrian desert between the United States and its Kurdish and Arab allies on the one hand, and Russia, the Syrian regime and Iranian-backed militias on the other, as both converge on territory held by the Islamic State in eastern Syria.

A Russian military spokesman, Maj. Gen. Igor Konashenkov, said the U.S.-backed Syrian Democratic Forces, or SDF, had twice in recent days shelled Syrian government positions outside Deir al-Zour, a strategic city in the region.

Konashenkov said Russian special forces are helping Syrian government troops fight Islamic State militants in the battle for the city.

Moscow has conveyed to the U.S. military command “in no uncertain terms that any attempts to open fire from areas where SDF fighters are located would be quickly shut down,” Konashenkov said in a statement. “Firing positions in those areas will be immediately suppressed with all military means.”

The tensions have been escalating as the SDF advances against the Islamic State from the northeast toward Russian-backed Syrian government forces pushing from the west, risking a collision at some point.

The warning that Russia is prepared to take military action to check any further advances by the U.S.-backed forces came after the United States said Saturday that Russian warplanes had struck an SDF position north of Deir al-Zour. Soldiers of the U.S.-led international coalition against the Islamic State were present at the time, according to a U.S. military statement.

The United States says it has about 500 troops in northern and eastern Syria, mainly Special Operations forces advising the SDF. But the actual number is larger, because the publicly announced figure does not include service members assigned to Syria for less than 18 months, according to Col. Ryan Dillon, a U.S. military spokesman.

Past close encounters between the United States and Russia in Syria have been resolved through the mechanism of “deconfliction” agreements, which outline where the rival forces may operate.

But there is no such agreement defining the U.S. and Russian areas of operation around the key towns and villages stretching south along the Euphrates River from Deir al-Zour toward the town of Bukamal on the Iraqi border. The area contains most of Syria’s oil and controls access to the Iraqi border, and it is viewed as a critical prize for all sides involved.

The Pentagon played down the tensions, saying that U.S. military officers and their Russian counterparts held a face-to-face meeting in Syria recently to discuss ways to mitigate future incidents.

The meeting lasted more than an hour, according to Dillon. Addressing reporters at the Pentagon from Baghdad, he said he expected follow-up meetings in the coming days. Although U.S. and Russian units are unable to communicate directly, their battlefield commanders are regularly talking to one another, he added.

Syrian government officials have said that reclaiming the area is essential as they pursue their goal of restoring sovereignty over all of Syria. They also want to prevent the United States from gaining influence over any more Syrian territory.

For Iran — a key backer of ­Syrian President Bashar al-Assad — the Iraqi border area represents an opportunity to cement its arc of influence, stretching from Tehran through Baghdad and Damascus to Beirut on the Mediterranean.

U.S. military officials say their primary goal is to defeat the Islamic State, which is thought to have concentrated many of its senior leaders in the area and is expected to make its last stand along the Euphrates River valley.

But Trump administration officials have said on several occasions that they have set the additional goal of containing any further expansion of Iranian influence in areas where the Islamic State is defeated. The Russian threat appeared to serve as a warning that if Washington intends to take on Iran in the area, it will have to contend with Russia as well.

The last time U.S.- and Russian-backed forces came close to collision in Syria, in the southeast near the border with Iraq, a full-scale confrontation was averted by negotiations securing a 34-mile deconfliction zone around two small U.S. outposts, Tanf and Zakaf. The bases had been established with a view to backing a small Pentagon-trained force of Syrian rebels to advance north in a bid to capture Islamic State-held Bukamal.

The issue was settled after ­Syrian troops and Iranian militias instead struck out to the north of the bases, reaching the Iraqi border and cutting the U.S.-backed forces’ route to Bukamal.

The U.S. military said this week that it had abandoned the base at Zakaf, leaving the area to be overrun by Syrian troops and their Iranian-backed militia allies.

Sly reported from Beirut. Thomas Gibbons-Neff in Washington contributed to this report.

Read more: