
Oil was discovered in Iran in 1908, and soon, all over the Middle East, oil was controlled by the US and Great Britain. Saudi Arabia and Iran would receive some 20% of the revenue, while the remaining 80% was taken away to the US (Saudi Arabia) and England (Iran). The city of Abadan, where much of the oil labor force was housed, had conditions similar to a concentration camp, and the Iranian laborers stayed in subhuman conditions.
In the late 1950s, US companies in Saudi Arabia bowed to local pressures and started sharing the revenues equally with the Saudis. Even with this precedent, the British oil company Anglo Iranian Oil Company refused to increase the share of the Iranian government. The Prime Minister at the time (1950), General Ali Razmera, tried to control the oil company by nationalizing it; he was suddenly assassinated in March 1951.
General Ali was replaced by an extremely popular and charismatic Prime Minister, Muhammad Mossadegh. Upon assuming charge of the government, he initiated several socio-economic reforms and development projects across Iran. In an effort to gain more revenue for the country in 1951, he initiated a 100 percent audit of the British company. Anglo Iranian Oil Company steadfastly refused to be audited.

In a calibrated response later in the year 1951, upon the Anglo Iranian Oil Company’s refusal to cooperate with the Iranian government, the Iranian parliament (Majlis) voted to nationalize Iran’s oil industry. It also voted to expel foreign corporate representatives from the country.
After this vote, Britain initiated many measures to pressure Iran, including a worldwide boycott of Iranian oil to economically pressure Iran. The prospect of a loss of oil income from Iran led to the CIA launching Operation Ajax, and the British government launched what it called Operation Boot. In both these endeavors, the plan was to overthrow the legitimate regime of Mossadegh in Iran.
There was a first coup attempt in 1953 against Mossadegh, which he successfully thwarted and even announced on the radio as a victory. At this time, the CIA was on the verge of giving up; this is when one individual named Kermit Roosevelt (grandson of the US president) organized large-scale protests between August 15-19, 1951 (as revealed by CIA records declassified in 2013). Eventually, Operation Ajax succeeded, and the popular Prime Minister was overthrown and arrested. After his arrest, the Shah Mohammed Reza Pahlavi of Iran was nominated as the leader of Iran (a puppet, actually).

Via Brooklyn eagle

In the trial that followed, Mossadegh was awarded a three-year solitary imprisonment (the prosecution had asked for the death penalty). He spent those three years in solitary confinement. Even at the end of these three years, he was considered a major threat to the Shah. As a consequence, he spent the remainder of his life in house arrest until 1967 when he died. He had requested a quiet burial in a public burial ground, but that was denied. He was eventually buried in the living room of his house.
This coup against an elected leader in Iran fueled anti-western sentiment, setting the tone for Iranian politics and eventually resulting in the overthrow of the Shah of Iran in 1979.
The Western powers and even Israel had good relations with Iran while the Shah ruled. Hence, the distrust for Western powers is deeply entrenched and widespread.