At least 40 Syrian soldiers and several Iraqis have been killed in western Iraq, officials in Baghdad say.
They were among a group who fled across the border into Iraq at the weekend to escape an attack by rebel fighters.
They were being driven back to the border in Anbar province when they were attacked by gunmen, officials said.
Inside Syria, opposition activists said rebels had overrun the northern city of Raqqa, in what would be one of their biggest victories of the conflict.
Unverified video footage was posted online, showing a cheering crowd pulling down a statue of Hafez Assad, the previous president and father of the current President Bashar-al Assad.
The UK-based Syrian Observatory for Human Rights (SOHR) said the rebels had "near-total control" of Raqqa after days of fierce fighting.
A police chief was killed and two government security officials were detained, SOHR said.
Opposition fighters already control suburbs of the capital, Damascus, and parts of other major cities such as Aleppo and Homs.
Raqqa has been a refuge for hundreds of thousands of Syrians who fled the violence in other parts of the country; many others have fled to neighbouring countries.
Some 70,000 people have died in the conflict which began with the uprising against President Assad's rule two years ago.
The group of Syrian soldiers and government employees had entered Iraq through the Yaarubiyeh border in the northern Nineveh province over the weekend, as anti-government rebels launched an attack on the area.
They were being taken to the al-Waleed border crossing further south in Anbar when they were ambushed at Akashat, a senior Iraqi official told Reuters.
"Gunmen set up an ambush and killed 40 of them, plus some Iraqi soldiers who were protecting the convoy," he added.
The identity of the gunmen is not known.
They appeared to have been well-prepared for the assault, having with them roadside bombs, automatic weapons and rocket-propelled grenades, officials said.
Iraq and Syria share a 600km (372 mile) border, and the government in Baghdad has often expressed concern that the violence in Syria could spill over into its own territory.
Anbar is a province dominated by Sunni Muslims who have been protesting for more than two months against the Shia-led government they accuse of trying to marginalise them.
The province has seen the formation of the Free Iraqi Army, a group openly supporting its fellow Sunnis in the rebel Free Syrian Army which is fighting the government of President Bashar al-Assad, whose own Alawite sect is an offshoot of Shia Islam.
A spokesman for the Iraqi prime minister told AFP news agency that the attack in Anbar "confirms our fears of the attempt of some to move the conflict to Iraq", but, he added, "we will face these attempts by all sides with all of our power".