Iranian involvement in the Iraq War

Iran was heavily involved in Iraq following the 2003 invasion that toppled Saddam Hussein from power. Iran often used Shia militias within Iraq to disrupt United States operations during the Iraq War, while also directly participating in the insurgency that followed the invasion. Iran funded the Mahdi Army (a group led by Muqtada al-Sadr), as well as Kata'ib Hezbollah, Asa'ib Ahl al-Haq, and the Promised Day Brigade.

Iran–United States relations
During a meeting with British Foreign Secretary Jack Straw on 25 September 2001, Iranian president Muhammad Khatami said "Iran fully understands the feelings of the Americans about the terrorist attacks in New York and Washington on September 11", and that Iranians instead felt differently and had expressed their sympathetic feelings with bereaved Americans. The attacks were condemned by both the President and the Supreme Leader of Iran. The military forces of the United States of America and the Islamic Republic of Iran cooperated with each other to overthrow the Taliban regime which had conflicts with the government of Iran. Iran's Quds Force helped US forces and Afghan rebels in 2001 uprising in Herat.

Months later, in his 2002 State of the Union Address, US President George W. Bush described Iran as being part of an "axis of evil" alongside Iraq and North Korea. Both reformists and conservatives in Iran responded negatively to this characterization, with Masoumeh Ebtekar calling it a "strategic mistake" by the Bush administration. Daniel Heradstveit and G. Matthew Bonham argued that the speech caused a reversal in friendly US–Iranian relations that had developed after the Cold War; the Iranian opposition figures they interviewed saw it as a "betrayal", and widely agreed that it was "a godsend to the conservatives", who favoured a more hostile and militant approach towards the United States.

Several claims have been made that the US has violated Iranian territorial sovereignty through the use of drones since 2003.

Iran–Iraq relations
In September 1980, Iraq under Saddam Hussein launched an invasion of Iran in an unsuccessful attempt to annex oil-rich Iranian territory, marking the beginning of a war that would last until 1988. The Iran–Iraq War is regarded as being a major trigger for rising sectarianism in the region, as it was viewed by many as a clash between Sunni Muslims (Ba'athist Iraq and other Arab States)  and the Shia revolutionaries that had taken power in Iran.

In a declassified 1991 report, the CIA estimated that Iran had suffered more than 50,000 casualties from Iraq's use of several chemical weapons, though modern estimates have reached more than 100,000, as the long-term effects continued to cause casualties; they also show that the United States was providing reconnaissance intelligence to Iraq around 1987–88, which was then used to launch chemical weapon attacks on Iranian troops, and that the CIA fully knew that chemical weapons would be deployed and sarin and cyclosarin attacks followed. According to Iraqi documents, assistance in developing chemical weapons was obtained from firms in many countries, including the United States.

In January 2002, one year before the U.S.-led invasion of Iraq, bilateral relations between Iran and Iraq improved significantly when an Iranian delegation, led by Amir Hussein Zamani, visited Iraq for final negotiations to resolve the conflict through talks on issues of prisoners of war and those who went missing in action during the Iran–Iraq War.

Role during the insurgency
In the aftermath of the 2003 invasion of Iraq, Iran supported Shi'ite insurgent groups dubbed the Special Groups in Iraq, which were made up by the Mahdi army, Kata'ib Hezbollah, Asa'ib Ahl al-Haq, and the Promised Day Brigade. The U.S. used the Iraqi government to fight these insurgents as a result. A 2008 report by the Combating Terrorism Center at West Point based on reports from the interrogations of dozens of captured Shia fighters described an Iranian-run network smuggling Shia fighters into Iran where they received training and weapons before returning to Iraq.

According to two unnamed US officials, the Pentagon is examining the possibility that the Karbala provincial headquarters raid was supported by Iranians. In a speech on 31 January 2007, Iraqi Prime Minister Nouri al-Maliki stated that Iran was supporting attacks against Coalition forces in Iraq, and some Iraqis suspect that the raid may have been perpetrated by the Quds Force in retaliation for the detention of five Iranian officials by US forces in the northern Iraqi city of Irbil on 11 January.

In 2007, tensions increased greatly between Iran and Iraqi Kurdistan due to the latter's giving sanctuary to the militant Kurdish secessionist group Party for a Free Life in Kurdistan (PEJAK). According to reports, Iran had been shelling PEJAK positions in Iraqi Kurdistan since 16 August. These tensions further increased with an alleged border incursion on 23 August by Iranian troops who attacked several Kurdish villages killing an unknown number of civilians and militants.

Covert Iranian military involvement
An estimated 150 Iranian intelligence officers, plus members of Iran's Islamic Revolutionary Guard Corps, are believed to be active inside Iraq at any given time. For more than a year, U.S. troops have detained and recorded fingerprints, photographs, and DNA samples from dozens of suspected Iranian agents in a catch and release program designed to intimidate the Iranian leadership.

Coalition forces also began to target alleged Iranian Quds Force operatives in Iraq, either arresting or killing suspected members. The Bush administration and coalition leaders began to publicly state that Iran was supplying weapons, particularly EFP devices, to Iraqi insurgents and militias although to date have failed to provide any proof for these allegations. Further sanctions on Iranian organizations were also announced by the Bush administration in the autumn of 2007. On 21 November 2007, Lieutenant General James Dubik, who is in charge of training Iraqi security forces, praised Iran for its "contribution to the reduction of violence" in Iraq by upholding its pledge to stop the flow of weapons, explosives, and training of extremists in Iraq.