Syrian rebels on Monday made a significant military gain when they seized the northern city of Raqqa, tearing down a giant poster of the president, Bashar al-Assad, and toppling a statue of his late father.

The rebels' advances in Raqqa came amid reports that unidentified gunmen on Monday shot dead at least 40 Syrian soldiers, together with several Iraqis, in Iraq's western Anbar province.

Dramatic video footage shows cheering protesters ripping down the gold statue of Hafez al-Assad in Raqqa's main square. In scenes reminiscent of the fall of previous Arab dictators, the protesters beat the statue's head with their shoes, shouting: "God is great." One man clobbers it with an axe.

The euphoria, however, is brief. A second video taken by activists soon afterwards captures a government mortar bomb landing in the square, followed by thick black smoke. Several dead and injured lie on the ground. Rebels frantically load the wounded, including a woman, into cars as a second mortar drops nearby.

Despite the shelling, rebels on Monday said they were now in "near total control" of the city, which is located towards the Turkish border on the Euphrates river. They have been advancing across Raqqa province for several weeks, capturing the country's largest dam. On Sunday anti-Assad fighters stormed Raqqa's central prison. They include units from the jihadist group Jabhat al-Nusra.

This is the first time that Syria's armed opposition has secured an entire provincial city. The rebels control much of Syria's rural north, and have partial control of several major urban centres including Aleppo, Homs, the eastern city of Deir el-Zour, and some suburbs of Damascus. Government soldiers in Raqqa remain in control of the Ba'ath party HQ and military base, activists said.

The regime, meanwhile, has launched a major offensive in Homs, in an attempt to recapture entrenched rebel positions in the centre of the town including the old city. Dozens from both sides have been killed in the assault in recent days, amid massive destruction and civilian casualties.

The Syrian soldiers killed in Iraq fled there late last week after they came under rebel fire.

They were returning to Syria under Iraqi escort when they were ambushed near the town of Akashat, not far from the Syrian border, Iraqi authorities said. The incident could inflame Syria's already simmering sectarian tensions. The uprising, which began two years ago, has pitted the country's predominantly Sunni majority against Assad's minority Alawite community, a Shia sect.

Shia Iraqis, as well as volunteers from Shia Iran, have fought with the regime against the rebels, sometimes openly. Tens of thousands of Iraqis died in sectarian warfare in Iraq between 2006-2007. Anbar's Sunnis have been venting frustrations that have built up since the US-led invasion overthrew Saddam Hussein, a Sunni, and handed power to Iraq's majority Shias.

"The incident took place in Akashat when the convoy carrying the Syrian soldiers and employees was on its way to the al-Waleed border crossing," Reuters reported, quoting a senior Iraqi official. The official added: "Gunmen set up an ambush and killed 40 of them, plus some Iraqi soldiers who were protecting the convoy."

The Iraqi officials said some 65 Syrian soldiers and government employees had handed themselves over to Iraq on Friday after anti-government rebels seized the Syrian side of the Yaarabiya frontier crossing.