Mr. Maliki has not expressed outright support for President Bashar al-Assad of Syria, whose minority Alawite sect is an offshoot of Shiite Islam. Mr. Assad’s allies in the region are the government of Iran, which is majority Shiite, and Hezbollah, the Shiite militant group that is a powerful political force in Lebanon.

But last week, Mr. Maliki warned that a victory for the Syrian insurgency could create a Sunni extremist haven in Syria and incite sectarian mayhem in his own country as well as in Lebanon and Jordan. All three countries, along with Turkey, are hosts to hundreds of thousands of Syrian refugees, mostly Sunnis.

According to accounts from Mr. Musawi and other Iraqi officials quoted by Western news agencies, the Syrian soldiers who were attacked originally crossed into Nineveh Province, Iraq, over the weekend to escape attacks by insurgents at the Yaarubiyeh border crossing. In returning them, Iraqi soldiers put the Syrians on a bus headed for a different border post, in Anbar Province, partly to avoid the same hostilities the Syrians had fled.

But the bus, part of an Iraqi military convoy, was attacked as it neared the Waleed crossing by gunmen armed with mortars, automatic weapons and improvised bombs, who appeared to have advance knowledge of the convoy route. Agence France-Presse quoted an Iraqi army officer, Lt. Col. Mohammed Khalaf al-Dulaimi, as saying that at least three vehicles were destroyed.

The Syrian state-run news agency SANA made no immediate mention of the ambush, but it quoted Mr. Maliki as saying he supported a peaceful solution of the Syrian conflict and that “vandalism and the use of arms will lead nowhere.”

News of the ambush came as Syrian rebel fighters claimed other gains against the government on Monday, notably the seizure of the contested north-central city of Raqqa after days of heavy clashes. Rebel videos uploaded on the Internet showed activists smashing a statue of President Assad’s father, Hafez, in the central square to punctuate their victory.

The Syrian Observatory for Human Rights, a Britain-based group with a network of contacts in Syria, quoted a lawyer in Raqqa as saying that the rebels had captured the provincial governor, Hasan Jalali, and the secretary general of the Raqqa branch of Mr. Assad’s ruling Baath Party, Suleiman al-Suleiman. If confirmed, they would be among the highest-ranking officials detained by insurgents.