Following the advance of the Islamic State of Iraq and the Levant (ISIL) into northern Iraq in mid-2014, Iran began to provide military aid to counter the militant advance.
Iran provided technical advisers to the Iraqi government and weapons to the Kurdishpeshmerga. Several sources, among them Reuters, believe that since mid-June 2014, Iranian combat troops are in Iraq, which Iran denies. Two US sources contend that in June or July 2014 Iran started an air war against ISIL.
Iraq's U.S.-trained army, shown here in 2008, largely disintegrated in the face of the ISIL offensive.
Strategy and tactics
Tehran's strategic objectives in its intervention in Iraq include keeping the Shia-led government in power and stabilizing its own border.
Iran has attempted to limit its overt military involvement in Iraq as a strategy geared toward avoiding the polarization of Iraq's Sunni minority, creating popular backlash against Iran among Iraqis, or deepening sectarian tensions. Most Iranian aid has thus far come in the form of technical assistance, the commitment of special forces troops, and air support. Iranian Brigadier-General Massoud Jazayeri stated that Iran could best help Iraq by providing it with direction on its "successful experiments in popular all-around defense" that included "mobilizing masses of all ethnic groups." Iran believes cooperation and unity among Iraq's fractious militias is essential in its battle against ISIL. Ali Khamenei, in remarks delivered on September 15, 2014, cred "the people of Iraq, the Iraqi Armed Forces and the popular forces" for halting the ISIL advance of the previous summer.
The Washington Post reported that Iran has sent more than 1,000 military advisers to Iraq, and spent more than $1 billion on military aid.
According to Iranian social media, ISIL troops on June 19 attacked two Iranian border guards near Iran's border city of Qasre Shirin, but this has not been confirmed by authoritative sources.
American war correspondent David Axe on his website 'War is Boring' asserted that on 21 June 2014 "it appears Iran joined the air war" of Iraq and Syria against ISIL.
By the end of June, according to American officials, Iran had established a control center at Al-Rasheed Air Base in Baghdad and was flying a small fleet of Ababil drones over Iraq, and an Iranian signals intelligence unit had been deployed at the airfield to intercept electronic communications between ISIL fighters and commanders.
On 1 July, according to IISS, several Su-25 aircraft were sent by Iran to al-Rashid and, later, to al-Muthanna air base. The aircraft were supported by bi-national Iranian/Iraqi ground crews who had been trained in Iran. (During the 1991 Gulf War, seven Su-25s had been flown by the Iraqi air force to Iran as a temporary safe haven and Iran had kept them since; ironically, some of them may now have returned to Iraq.)
On 5 July, Qods Force pilot Shojaat Alamdari was killed in Samarra, probably working there as a forward air controller.
Iraqi Kurdish President Barzani and Iranian foreign minister Zarif said, end of August 2014, that Iran had been the first country to provide weapons and ammunition (at unspecified date) to the Iraqi Kurdish forces (Peshmerga). Zarif said that Iran cooperated militarily with the Iraqi central government and the Kurds, but that it had "no military presence in Iraq". In contradiction to that Iranian denial, Business Insider, without naming its sources, contends that in early August, Iran's IRGC sent Quds Force personnel, attack aircraft and drones to Iraq, and that since early August Iran was operating its Su-25 aircraft (see July 2014) in combat against ISIL.
On August 21–22, according to Kurdish sources, hundreds of Iranian soldiers, allegedly from Iran's 81st Armored Division, helped Peshmerga to take back Jalawla in Diyala Governorate from ISIL. Iran subsequently denied any military presence in Iraq.
In late September, Iranian general Ahmad Reza Pourdastan threatened to "attack deep into Iraqi territory" should ISIL forces approach the Iranian border. Earlier in the month, the Iranian government announced it had arrested Afghan and Pakistani nationals attempting to "cross Iran" to join ISIL.
On November 14, it was reported that the army had taken full control of Baiji, forcing ISIL forces to withdraw, and on 18 November, the anti-terrorism force Mosul Battalion entered the refinery for the first time since June. However, this could not be confirmed independently. If confirmed, it would be a major victory for Iraqi forces. State television said that they had entered the gates of the refinery. Meanwhile, it was confirmed that Iraqi forces were in full control of Baiji. Iraqi state television said Baiji's recapture was a "Graveyard for ISIS". Later, the US Department of State congratulated the Iraqi forces for retaking the country's largest oil refinery, confirming the Iraqi victory.
At the end of November, according to Israeli website Haaretz, Al Jazeera broadcast video showing Iranian F-4 Phantom jet-fighters bombing ISIL targets in northeastern Iraq, though Al Jazeera in its report alleged they were "Iraqi jet-fighters". US rear Admiral John Kirby affirmed on 3 December that he had "indications that [Iran] did indeed fly air strikes with F-4 Phantoms" targeting ISIL positions in the eastern Iraqi province of Diyala.
On 27 December, Iranian IRGC Brigadier General Hamid Taqavi was killed in Samarra, Iraq, reportedly by an ISIL sniper. He is the highest ranking Iranian military official to die in Iraq since Iran's military intervention began.
On 2 March, Qasem Soleimani, commander of the Iranian Quds Force, was directing Shia militia operations on the eastern flank during the surrounding of ISIL fighters, and was reportedly taking a leading role in the fighting of Iraqi forces and Shia militias against ISIL.
Jim Phillips of the American The Heritage Foundation in March described Suleimani's role in this war as: "he's Iran's viceroy for Iraq".
Iraqi Prime Minister Haider al-Abadi said "we do respect this Iranian commander and our collaboration with him is not a secret", adding that Iran was quick in sending arms to Iraq and helping Baghdad when ISIS captured the country's Sunni provinces.
Iraqi leader Hadi al-Amiri said that "If it were not for the cooperation of the Islamic republic of Iran and General Suleimani, we would not today have a government headed by Haider al-Abadi in Baghdad". During the Second Battle of Tikrit, Hadi al-Amiri said US has failed to live up to its promises to help Iraq fight ISIL, unlike the "unconditional" assistance being given by Iran.
On December 31, 2014, Defence Ministers of Iran and Iraq signed a military pact to combat ISIS.
"Iranians will try to calm the fears of the Sunnis instead of persecuting them because the Iranian officials know that it is in their best interest to keep the Iraq united," said Hadi Jalo, a Baghdad-based political analyst. "For the Iranians, it is easier to dominate one country instead of three separate states."
Iran's attempts at a non-sectarian and inclusive policy in Iraq are also evident in its programmes of arming & training Sunni and more recently Christian militias in the effort to fight ISIL both militarily & politically by de-legitimising the militant groups sectarian philosophy.
United States: Following the introduction of Iranian troops into Iraq in June 2014, President Barack Obama said that "Iran can play a constructive role if it is helping to send the same message to the Iraqi government that we're sending." In July, Secretary of Defense Chuck Hagel offered further explanation, noting that "we are aware of the Iranian and Russian efforts to help the Iraqis, but we are not involved in coordinating any missions."
In September 2014, Secretary of State John Kerry said the U.S. "does not have any intention" of cooperating with Iran. Nevertheless, later that month, Kerry met with Iranian foreign minister Mohammad Javad Zarif in New York City where the two discussed ISIL.
The US in December 2014 continued to deny cooperation with Iran with American Ambassador to Iraq Stuart E. Jones saying: "Let's face it, Iran is an important neighbour to Iraq. There has to be cooperation between Iran and Iraq. The Iranians are talking to the Iraqi security forces and we're talking to Iraqi security forces ... We're relying on them to do the deconfliction" in December 2014.
Other international reactions to Iranian intervention
Canada - Speaking at the United Nations, Canadian Foreign Affairs MinisterJohn Baird said Iran was "involved in a negative way in every single country in the region" and stated that Canada considers Iran a state sponsor of terrorism.
China - China has said it wants Iran to be part of an "anti-ISIS alliance."
India - In what The Hindu declared was a likely reference to the exclusion of Iran and Syria from the American-led intervention in Iraq, Prime Minister Narendra Modi in September said that "everyone must be included in a global fight against the terror we see in west Asia."
Italy - Italian foreign minister Federica Mogherini has said Iran can play a "positive role" in operations against ISIL and added that she hoped agreement could be reached by which Iran would join "the countries that are working to combat ISIL and support the Iraqi government." 
Israel - During an NBC television interview in June, Israeli prime minister, Benjamin Netanyahu, made known his concerns over American cooperation with Iran. He offered the following words of advice to President Barack Obama, "when your enemies are fighting one another, don't strengthen either one of them. Weaken both." Netanyahu also expressed his concern over Iran acquiring nuclear weapons, asserting it would be a tragic mistake that would make everything else pale in comparison.
Russia - Russia has said it wants Iran to be part of an "anti-ISIS alliance."
Iran and Hezbollah's reaction to American-led intervention in Iraq
At the same time as the Iranian intervention into Iraq, a parallel American-led intervention was occurring. Neither nation is known to have cooperated with the other in combating ISIL. Iranian president Hassan Rouhani has dismissed U.S. involvement, noting that "Iran, from the very first moment, did not hesitate in fighting against terrorism. Other countries apparently had their doubts for quite some time ... they acted quite late in the game." Rouhani went on to question the level of American commitment, noting that the U.S. had not committed ground troops, as Iran had with, according to The Economist, Iranian officials boasting of being the ground force for America's air strikes.
On September 29, in response to a statement by U.S. Secretary of State John Kerry that the United States wanted "to find out if they [Iran] will come on board" the American-led intervention, Ali Khamenei declared the U.S. position on ISIL as "absurd, hollow and biased." Nonetheless, Khamenei also noted that some Iranian government officials were "not against" cooperation with the United States, explaining that he had personally quashed the suggestion of joint action against ISIL. In follow-up remarks, the Iranian-affiliated Kataib Hezbollah declared it would "not fight alongside the American troops under any kind of conditions whatsoever," adding that its only contact with the United States military would be "if we fight each other."
At least one Hezbollah official has indicated the party will continue to operate independently, or in concert with Iraqi and Iranian forces, against ISIL and will not cooperate with the U.S.-led coalition concurrently operating against ISIL. Mohammad Raad dismissed the NATO-centered coalition as neither serious nor sufficient to counter ISIL and noted that Hezbollah had initiated military operations against the ISIL prior to United States involvement.
Despite the cool reception given by Iran and its allies to the United States intervention, some observers believe the U.S. coalition will eventually be forced into brokering an alliance with Tehran. Eyal Zisser of Tel Aviv University has explained that "the West is helpless and does not know what to do against the Islamic State" and that it will ultimately conclude it has no choice but to ally with Iran.