United States and Russian generals met in Syria in recent days amid rising military tensions to discuss control of a key region in the eastern part of the country, a spokesman for the U.S. joint task force confirmed Thursday.

The leaders spoke for at least an hour about how their converging forces would manage anti-Islamic State operations and avoid firing on each other in Syria's Deir al-Zour province and along the Euphrates River valley leading to the Iraq border, said Col. Ryan Dillon, who spoke from Baghdad.

"They had a face-to-face discussion, laid down maps and graphics to discuss where those deconfliction measures would be put into place," he said.

It appeared to be the first time U.S. and Russia military leaders held such a meeting, according to Dillon, and word of it came as Russia warned Thursday it would retaliate against shelling attacks by the U.S.-allied Syrian Democratic Forces in the area.

As the Islamic State loses territory, the U.S. and SDF are increasingly running up against advancing Russian and Syrian regime forces. The forces are now facing each other along the banks of the Euphrates at the city of Deir al-Zour.

The U.S. and Russia have been using telephone lines for what the military calls deconfliction, or establishing territory and ensuring there are no unintentional clashes with nearby forces.

Dillon said the generals discussed how the two sides would handle the Euphrates valley, a strategic location that is believed to harbor Islamic State fighters.

"Part of the discussions is the expansion of this deconfliction line as its moves further on down the middle of the Euphrates River valley," Dillon said. "We very much, as the coalition and our Syrian Democratic Forces, want to continue to continue down into these areas where we know ISIS is."

Russia claimed Thursday that its forces had been fired upon by mortars and rockets twice in the past week from SDF and U.S. special operations positions on the river, and warning that it would take immediate retaliatory action.

"Firing points in these areas will be immediately suppressed by all means of destruction," said Igor Konashenkov, the defense ministry spokesman.

Dillon said recent tensions show why deconfliction work between the two countries is important.

"We will continue to deconflict and continue ensure that our forces have all the protective measures in place and are ready to defend ourselves if necessary," he said.