Washington: The longstanding relationship between the United States and Saudi Arabia, its main Middle East ally, is founded largely on the exchange of American security for Saudi oil.

As Saudi Crown Prince Mohammad bin Salman heads to Washington for talks with President Donald Trump, here is a look over the partnership.

Partners since 1945

Abdul Aziz Ibn Saud with US President Franklin Roosevelt in 1945. AP

The discovery of vast oil reserves beneath Saudi sands in the late 1930s secured the kingdom’s place as a vital partner for the energy-hungry United States.

The two countries initiated diplomatic relations in 1940 during World War II.

The partnership was sealed in 1945 at a historic meeting between then-king Abdul Aziz Ibn Saud and US president Franklin D. Roosevelt on board the USS Quincy as it cruised the Suez Canal.

The agreement promised the kingdom military protection in exchange for access to oil.

Cooperation

Responding to Iraq's invasion of Kuwait, troops of the U.S. 1st Cavalry Division deploy across the Saudi desert Nov. 4, 1990, during preparations prior to the Gulf War. AP

When Iraqi dictator Saddam Hussain invaded Kuwait in 1990, then-US president George H.W. Bush launched Operation Desert Storm that soon liberated the country. The United States used airbases in Saudi Arabia as vital staging posts, sending thousands of American troops into the kingdom.

It was “a moment of unparalleled cooperation between two great nations,” Bush said.

In the years that followed, US-led coalition planes took off from Saudi bases to enforce no-fly zones in Iraq.

9/11 attacks

The impact of the second plane hitting the World Trade Centre.

The twin tower attacks that killed almost 3,000 people in the United States tested the US-Saudi relationship, with 15 of the 19 Al Qaida attackers from Saudi Arabia.

Saudi Arabia condemned the attacks but was accused of secretly financing extremist militants.

It refused to take part in strikes on Al Qaida bases in Afghanistan in late 2001; Riyadh was also not part of the 2003 US-led invasion of Iraq that led to Saddam Hussain’s downfall.

Washington pulled most of its remaining troops from the kingdom from 2003 and transferred its regional military headquarters to Qatar, while continuing military cooperation with Riyadh.

Barack Obama

Former U.S. President Barack Obama Reuters

Simmering tensions between the administration of US president Barack Obama and Saudi Arabia came to a head when Riyadh refused in October 2013 a seat on the UN Security Council.

It was an unprecedented act aimed at protesting inaction over the Syrian conflict, then in its third year.

Riyadh, which backs rebels fighting against the regime of Syrian President Bashar Al Assad, was angry that Obama pulled out of strikes against the Syrian regime a month earlier.

The 2015 agreement over Iran’s nuclear programme further rattled Riyadh’s confidence as it feared Washington was tilting towards its regional rival.

Donald Trump

Donald Trump and Mohammad Bin Salman shaking hands in the State Dining Room before lunch at the White House in Washington, DC, in March last year. Trump will host Saudi Arabia’s crown prince in Washington. AFP

Riyadh has issued a series of laudatory comments about the Trump administration, which echoes its concerns about Iranian regional influence.

Trump chose Saudi Arabia for his first foreign trip after taking office, arriving in May 2017 to much fanfare and ceremony.

The partners announced major contracts worth more than $380 billion - including $110 billion for the sale of American arms to Saudi Arabia, aimed at countering what they see as a threat from Iran and radical Islamists.

The allies also both accuse Iran of involvement in the Yemen conflict on the side of Al Houthi militants.

At the head of an Arab military coalition, Riyadh has since March 2015 deployed forces against the rebels, who captured the capital Sana’a in 2014.