baiji iraq
A military vehicle is seen in Baiji, north of Baghdad, July 2, 2015. Reuters/Mushtaq Muhammed

Islamic State group suicide bombers and fighters attacked the center of Iraq's northern oil refinery town of Baiji overnight, forcing the army and Shi'ite fighters to pull back, military sources and the local mayor said on Sunday.

The town of Baiji and its refinery - Iraq's largest - have been a battlefront for more than a year. The hardline Islamists seized the town in June 2014 as they swept through much of northern Iraq towards the capital Baghdad.

Control of Baiji neighborhoods has changed hands many times during the conflict. The latest Islamic State offensive comes after authorities said they controlled nearly the whole town and expected to drive insurgents from the refinery within days.

The militants attacked around 8 pm (1300 EDT) on Saturday with two suicide car bombings. The blasts were followed by fierce clashes that lasted until midnight and drove the army and mainly Shi'ite Hashd Shaabi forces from the center of town, two army colonels said.

Baiji mayor Mahmoud al-Jabouri said there had been a pattern of withdrawals by Islamic State fighters in the town followed by counter-offensives. "Their lethal weapons are suicide attacks and snipers, and this is why we have fighting back and forth."

Army officers said the army and Hashd groups were preparing a response. "Islamic State fighters are still holding positions in three neighborhoods in Baiji and they are still receiving reinforcements," said one of the army colonels.

In Anbar province west of Baghdad, witnesses said two rockets hit a crowd in the Islamic State-controlled provincial capital Ramadi on Saturday evening, killing at least 18 people.

They said a group of people had gathered after the daily Ramadan fast to play Muhaibis, a game where players have to identify a member of the opposing team who is hiding a ring.

"I heard a blast and saw fire coming from Dolphin Square. I ran to the place and saw vehicles carrying bodies and wounded covered with blood. They were innocent people playing a ring game; they were not making bombs,” said Haj Thamir Ahmed, a Ramadi resident who lives nearby.

In northwest Baghdad, at least three people were killed and 11 wounded when a bomb went off near a restaurant in the mainly Shi’ite district of Shulaa on Sunday morning, police and medical sources said. Another two people were killed by a bomb in Hussainiya on the city's northern outskirts.

There was no immediate claim of responsibility for those attacks, but statements in the name of Islamic State said the group carried car bombings on Saturday evening in Baghdad and Balad Roz which killed 10 people.

(Reporting by Ahmed Rasheed; Writing by Dominic Evans; Editing by Larry King)