BAGHDAD At least 42 Syrian soldiers were killed in a well-coordinated ambush Monday after seeking refuge across the border in Iraq following clashes with rebels in their home country, officials said. The attack in Iraq's restive western province of Anbar is likely to significantly raise concerns that Iraq could be drawn into the Syrian civil war.

Iraqi officials said the Syrians had sought refuge through the Rabiya border crossing in northern Iraq during recent clashes with rebels and were being escorted back to Syria through a different border crossing farther south when the ambush occurred. The gunmen struck near the area of Akashat, not far from the Syrian border, although the identity of the attackers was not known.

A senior military intelligence official said the attackers appeared to have been tipped off about the soldiers' movements and prepared a well-coordinated attack involving roadside bombs and rocket-propelled grenades. They finished off the attack by spraying the vehicles with bullets.

He and another official accused al Qaeda in Iraq of organizing the attack because the militant group is known to have a presence in the area where the ambush occurred. They said it was unlikely that Syrian rebels had managed to cross the border from Syria into Iraq to carry out the attack.

Get Breaking News Delivered to Your Inbox

At least seven Iraqi soldiers who were escorting the Syrians were also killed, officials said.

The officials spoke on condition of anonymity because they weren't authorized to release the information to reporters.

Sporadic clashes between the Syrian army and rebels fighting to topple Syrian President Bashar Assad have been reported near the Rabiya border crossing in recent days. Officials have previously said a number of Syrians, including some who were wounded, had crossed into Iraqi territory to escape the fighting.

On Friday, Iraqi officials said a Russian-made rocket fired from Syria slammed into Iraqi territory, though no casualties were reported.

Iraqi officials have repeatedly warned that violence from Syria's civil war could spill into Iraq.

Iraqi Prime Minister Nouri al-Maliki told The Associated Press last week that he feared a victory for rebels in the Syrian civil war would create a new extremist haven and destabilize the wider Middle East, sparking sectarian wars in his own country and in Lebanon.

His comments reflect fears by many Shiite Muslims in Iraq and elsewhere that Sunni Muslims would come to dominate Syria should Assad be toppled.

The war in Syria has sharp sectarian overtones, with predominantly Sunni rebels fighting a regime dominated by Alawites, an offshoot of Shiite Islam. Rebel groups have increasingly embraced radical Islamic ideologies, and some of their greatest battlefield successes have been carried out by Jabhat al-Nusra, an al Qaeda-affiliated group which the U.S. has designated as a terrorist organization.

Iraq's Shiite-led government has faced more than two months of protests from Sunni Muslims angry over perceived discrimination. The rallies began in Anbar, the vast desert province where Monday's attacks occurred.