Iraq's invasion of Iran, starting the Iran–Iraq War, came shortly after the 1978-1979 Iranian Revolution and the Iranian Hostage Crisis starting in November 1979. The U.S. had been strongly allied with the Shah of Iran, who had bought weapons from the West, primarily but not exclusively from the U.S. Iranian domestic opinion was anti-U.S. because the U.S. had been seen as the patron of the unpopular Shah, Mohammed Reza Pahlevi. The hostage crisis turned a good deal of U.S. public opinion against Iran, so even if the U.S. government, for reasons of state, wanted to support Iran in the Iran–Iraq War, it would face strong domestic resistance. The original U.S. policy of neutrality toward Iran and Iraq, with initial Iraqi military successes, made Iran more eager to find a source of arms, and the Soviet Union capitalized on this opportunity. U.S. domestic opinion was not as much pro-Iraqi as anti-Iranian, which created an opening for the Soviet Union to gain influence in Iran. The Soviets recognized that Iran saw both superpowers as antagonists, and remained open to opportunities, especially under Gorbachev.