BAGHDAD -- Islamic State militants killed up to 50 soldiers in two separate ambushes in Iraq's turbulent Anbar province west of the capital, Baghdad, a top provincial official said Saturday.

Sabah al-Karhout, president of the Anbar Provincial Council, told The Associated Press the ambushes took place Friday west of the provincial capital, Ramadi, but said he had no more details. There was no immediate word from federal authorities or the Islamic State group.

The Islamic State group controls much of the vast Anbar province, including Ramadi and the city of Fallujah.

Government forces and Shiite militiamen have been trying to dislodge Islamic State fighters from the province but they have been making slow progress. They also have been coming mounting pressure in the oil refinery town of Beiji north of Baghdad, with Islamic State militants fighting their way toward the centre of the town. Beiji was liberated from the extremists late last year.

"The operations in Anbar are going according to plans, but progress is slow and the advances are halted by roadside bombs and booby-trapped buildings," al-Karhout said.

Defence Minister Khalid al-Obeidi on Saturday toured the military's northern command in Anbar, according to a statement issued by his office. During a meeting with troops there, he counselled that forces there must use "caution and precision" when advancing to avoid "unjustified losses."

Later, a statement posted on the ministry's official website said al-Obeidi on Saturday also fired the commander of a brigade deployed in Anbar as part of the 10th Mechanized Infantry Division. It did not name the commander, but added that he failed to carry out his duties.

"There is no place for those who neglect to carry out their missions and duties. Those who want victory must be on the front line," it quoted the minister as saying.

It was not immediately clear whether the minister's visit and the firing were linked to the deadly ambushes.

The Islamic State group controls about a third of Iraq and neighbouring Syria and has established a self-declared "caliphate" across its territory.

In scattered violence Saturday in Baghdad, three separate bombings killed at least eight people and wounded 23, said security and hospital officials who spoke condition of anonymity because they were not authorized to brief journalists.