Kirkuk Kurds
An armed member of the Kurdish security forces takes a position during a patrol on the outskirts of the Iraqi city of Kirkuk June 14, 2014. Reuters/Azad Lashkari

The Islamic State group launched an attack on the oil-rich Iraqi city of Kirkuk Friday, but was forced to retreat from the area after the Kurdish military pushed its fighters back. Although the Sunni militant group lost a battle against the Kurdish peshmerga army, it's actively planning the takeover of the city by recruiting local tribesmen who have pledged allegiance to the group and may provide intelligence.

If the Islamic State group succeeds in taking even part of the city, it will control an important swath of territory on the way to Erbil, an Iraqi economic powerhouse and the central hub for U.S. and European diplomats as well as economic interests in the region.

The Islamic State group, formerly known as either ISIL or ISIS, attacked Kurdish military positions south of the center of Kirkuk Friday, launching car-bomb attacks and shooting at peshmerga soldiers. Although it had not attacked Kirkuk in force for weeks, the militant group is now signaling it is making a new effort to capture the city. According to local Kurdish sources, the group is using its alliances with local Sunnis, ones that were first established back in June, to gain greater access to positions from where it can attack Kurds.

Officials told the Kurdish news service Rudaw that seven peshmerga soldiers were killed in the battle Friday. They included Brig. Sherko Shwani, a top commander. After the clashes, Kurdish officials ordered a curfew with no specific end time. The attack by the Islamic State group came just two days following its beheading of a peshmerga soldier in Mosul, the second-biggest Iraqi city that it occupied last year. It posted the beheading video online.

Photographs emerged on Twitter of Kurdish residents in Kirkuk dragging the dead bodies of Islamic State fighters from cars through the city's streets. But not everyone living in the area is against the idea of rule by the militant group.

In fact, some welcome it. Among them are Sunni tribal chiefs near Kirkuk who pledged allegiance to the Islamic State's self-described caliph, Abu Bakr al-Baghdadi, according to a tweet posted by an ISIS-linked account showing an assembly of tribal elders declaring their fealty to him.

"These are ... Arabs that don't think Baghdad is going to protect them," said Judith Yaphe, a lecturer at George Washington University's Elliott School of International Affairs.

At least since former Iraqi Prime Minister Nouri al-Maliki, a Shiite, assumed power in 2006 and initiated anti-Sunni policies, the Sunni tribesmen around Kirkuk have felt disenfranchised and unprotected by the government. When the Islamic State group first seized Mosul in June, it immediately began recruiting fighters and supporters in Sunni neighborhoods. Scarred by Maliki's oppressive policies, former Baathist officers and Sunni men wanting more protection for their villages aligned themself with the militant group.

"There is no other viable Sunni force," said Denise Natali, a Kurdish expert at the Institute for National Strategic Studies at the National Defense University in Washington. "The ISIS problem is being superimposed over pre-existing conflicts in the area."

The dispute over Kirkuk between Kurds and Arabs is also a problem that surfaced in advance of the emergence of the Islamic State group. Before the U.S.-led invasion of Iraq in 2003, Kurds had fled the area, under pressure from Sunni Arabs. Since then, Kurds have returned to the city and now have control over the surroundings, including rich oil fields, and are currently conducting land grabs, targeting Sunnis.

The U.S. has for months supported the Kurdish military with arms and training in an attempt to defeat the Islamic State group. But that effort is also fueling historical tensions in the region.

ISIS and the Kurds aren't the only two forces vying for power over Kirkuk, either. The central government in Baghdad also has its eyes set on the area because of the massive amount of oil there. For now, though, the Kurdish Regional Government and Baghdad have agreed to share the revenue from oil production in Iraqi Kurdistan, most of which is pumped around Kirkuk.