The Islamic State of Iraq and Syria, or ISIS, took control of Baiji, Iraq’s biggest oil refinery, north of Baghdad, even as Iran’s President Hassan Rouhani warned on Wednesday that his nation will protect Shiite religious sites in Iraq from any attacks by the Sunni extremist group.

ISIS took control of the refinery after beating back government troops who were defending the oil refinery, after heavy fighting. Meanwhile, the Iranian government said that many people have volunteered to go to Iraq to defend sites holy to Shia Muslims, who form Iraq's majority, and to "put the terrorists in their place," Reuters reported. As the refinery fell to the militants, oil prices settled at $106.58, up nearly 0.5 percent on Wednesday.

“Regarding the holy Shia shines in Karbala, Najaf, Kadhimiya and Samarra, we announce to the killers and terrorists that the big Iranian nation will not hesitate to protect holy shrines," Rouhani said, according to Reuters, adding: “I'll tell the dear people of Iran that veterans and various forces - Sunnis Shias and Kurds all over Iraq - are ready for sacrifice.”

Baiji is a vital asset to fall under ISIS' control as it is the largest source of fuel for Iraq's domestic consumption, and it is feared that the loss of the refinery's control could affect supply of fuel in the region as well as create further shortages within the country. ISIS forced the refinery to shut down Tuesday, triggering a spike in oil prices around the world.

"The militants have managed to break in to the refinery. Now they are in control of the production units, administration building and four watch towers. This is 75 percent of the refinery," an official inside the refinery told media.