BAGHDAD -- Iraqi security forces have recaptured areas lost earlier to the Islamic State group in and around the western city of Ramadi in the volatile Anbar province, security officials said Tuesday.

Police Maj. Omar al-Alawani said government forces regained control of the city's Pediatric and Maternity Hospital and the surrounding neighbourhood late Monday night after fierce clashes with IS militants. The hospital is located about 500 metres (yards) from a complex of government offices.

On Tuesday, Iraqi troops were engaged in intense clashes in an offensive to regain control of Soufiya, one of three villages that fell into the hands of the Islamic State group last week, said police Col. Mahdi Abbas.

Both officials said the battles turned in favour of government forces after the arrival of reinforcements and weapons from Baghdad. At least 12 militants were killed in the clashes overnight, they said.

Footage obtained by The Associated Press showed military black Humvees advancing in a residential area in Ramadi and Iraqi soldiers firing their rifles while taking shelter behind a wall.

The security situation in Ramadi, the capital of Anbar, sharply deteriorated after IS seized Soufiya and the two other villages, Sjariyah and Albu-Ghanim, forcing thousands of civilians to flee their homes.

Elsewhere in Iraq, police said a bomb exploded Tuesday in a commercial street in the town of Madain, just south of Baghdad, killing three people and wounding four. Later in the day, a roadside bomb hit a police patrol in the capital's western suburbs, killing two policemen and wounding four.

Medics in nearby hospitals confirmed the casualties. All officials spoke on condition of anonymity because they were not authorized to speak to the media.

Later Tuesday, a bomb struck mourners attending a funeral in the northern city of Kirkuk, killing three people and wounding 19 others, said police Col. Jenkis Mohammed Rasheed.