Iran, perceiving a serious threat from Islamic State in northern Iraq, has determined to cooperate with the U.S. against the group, the BBC reported on Friday.

According to the report, which quoted sources in Teheran, Ayatollah Ali Khamenei has cleared his top military commander to cooperate with U.S., Iraqi and Kurdish forces.

Iran, run by Shi'ites, considers the Islamic State's Sunni fighters a threat. The Islamic State, which is trying to form a caliphate in Iraq and Syria, considers Shi'ites heretics, the BBC reported.

The Iranian leader had previously expressed his objection outside "interference" in Iraq.

Late last month, U.S. President Barack Obama authorized U.S. air strikes to break a two-month siege by the Islamic State of the Shi'a town of Amerli. The air attacks helped Shi'a and Kurdish forces break Islamic State's hold on the area, reports say.

In addition, U.S., British, French and Australian aircraft air-dropped aid to the residents there, indicating progress in Obama's efforts to persuade allies to join the fight against the Islamic State.