A Syrian army soldier fires artillery shells towards Islamic State (IS) group jihadists in northeastern Palmyra on May 17, 2015
Baghdad (AFP) - The Islamic State group sealed its capture of Ramadi Sunday after a dramatic pullout by Iraqi forces but was prevented by Syrian troops from taking the heritage site of Palmyra.
Iraqi Prime Minister Haider al-Abadi urged government forces to hold fast in Ramadi and prevent IS from making further gains, saying they would have air cover and Shiite militia reinforcements.
The effective loss of the capital of Iraq's largest province of Anbar marked one of Baghdad's worst setbacks since it began a nationwide offensive last year to reclaim territory lost to the jihadists in June 2014.
IS said in an Internet post it fully controlled Ramadi, after a local official admitted the operations command centre there had fallen.
"God has enabled the soldiers of the caliphate to cleanse all of Ramadi... after storming the 8th brigade. They (now) control it along with a battalion of tanks and missile launchers and in addition to the Anbar operations command," the IS statement said.
Muhannad Haimour, spokesman and adviser to the provincial governor, said "Anbar operations command has been cleared".
A colonel among troops who had withdrawn added: "Daesh has just taken full control of all main security bases", using an Arabic acronym for IS.
The United States said it was still monitoring tough fighting in parts of Ramadi and described the situation as "fluid and contested."
"It is too early to make definitive statements about the situation on the ground there at this time," Pentagon spokeswoman Maureen Schumann told AFP.
Abadi said troops, tribesmen and elite forces "must hold their positions and preserve them and not allow Daesh to extend to other areas in Ramadi", spokesman Saad al-Hadithi said.
- 'Continuous air cover' -
"There is continuous air cover that will help ground troops there hold their positions while waiting for support from other forces and the Popular Mobilisation Units," he said of an umbrella group for Shiite militias.
The International Organization for Migration said around 24,000 people had been forced from their homes in three days of violence in the Ramadi area.
Haimour said at least 500 people, both civilians and military, were killed in the jihadist offensive.
A local Anbar province official said Abadi had approved the dispatch of the Popular Mobilisation Units known as Hashed al-Shaabi to Anbar.
"The provincial council of Anbar decided to call on Hashed al-Shaabi, which operates under the umbrella of the commander in-chief of the armed forces," said Mahdi Saleh al-Numan, security adviser to the Anbar governor.
The move marks a U-turn from the Sunni province's previous opposition to resorting to the Shiite force.
Shiite militia groups flashed messages on their respective TV channels vowing to flush IS out of Ramadi within days.
The jihadists used a wave of suicide car bombings to take most of the city and raised their black flag over the provincial headquarters.
Taking full control of Ramadi, some 100 kilometres (60 miles) west of Baghdad, would be the most significant victory this year for IS, which has suffered a string of setbacks elsewhere in Iraq and Syria.
- Setback in Syria -
On Sunday IS faced another setback across the border in Syria where government forces drove them out of the ancient oasis town of Palmyra, home to a UNESCO world heritage site.
"IS's attack was foiled," provincial governor Talal Barazi said after troops routed the jihadists from the northern part of the modern town of Palmyra which they had seized on Saturday.
The Syrian Observatory for Human Rights monitoring group said, however, that IS fighters were still just a kilometre (less than a mile) from the archaeological site and its museum housing priceless artefacts.
It said nearly 300 people have been killed in four days of fighting -- 123 soldiers and their allies, 115 IS fighters and 57 civilians.
Syrian antiquities chief Mamoun Abdulkarim expressed relief that IS did not attack Palmyra as it has done in centuries-old sites in Iraq.
"We have good news today, we feel much better," Abdulkarim he said.
UNESCO has urged both sides to spare Palmyra, which it describes as one of the most important cultural centres of the ancient world.
Meanwhile, Observatory head Rami Abdel Rahman said a rare US raid Friday on one of Syria's largest oilfields killed 32 IS militants, including four top leaders.
"The US operation killed 32 members of IS, among them four officials, including IS oil chief Abu Sayyaf, the deputy IS defence minister, and an IS communications official," he said.
American officials have said "about a dozen" people were killed in the operation by Iraq-based US commandos trying to capture Abu Sayyaf.