But Trump has not always been a fan of the conservative Muslim nation.
Before he was leader of the free world, Trump spent years publicly bashing Saudi Arabia. He repeatedly demanded that the Saudis compensate the United States for its long-standing alliance. During the presidential election, he condemned the country for its history of human rights violations. (As president, he has praised authoritarian leaders and has signaled that addressing abuses in other countries will not be at the forefront of his administration.)
“They must pay dearly! NO FREEBIES,” he tweeted in March 2015, saying Saudi Arabia should use its vast wealth to pay the United States accordingly for its “help and protection.”
Trump repeated his criticisms multiple times as a Republican presidential candidate. He did so during an interview with NBC's Chuck Todd on “Meet the Press” in August 2015, at a speech in Green Bay, Wis., in August 2016 and during the presidential debate in Hempstead, N.Y., in September 2016.
He also was a critic of President Barack Obama's policies in the Middle East.
Trump also used Saudi Arabia to attack his opponent, former Democratic presidential candidate Hillary Clinton.
Last year, Trump slammed the Clinton Foundation for accepting millions of dollars from a country that abuses women and is intolerant of members of the lesbian, gay, bisexual and transgender community.
“You talk about women and women's rights. These are people that push gays off business — off buildings. These are people that kill women and treat women horribly, and yet you take their money,” Trump said during a presidential debate last October in Las Vegas. “So I'd like to ask you right now. Why don't you give back the money that you've taken from certain countries that treat certain groups of people so horribly? Why don't you give back the money. I think it would be a great gesture …”
According to the foundation's donor list, it received between $10 million and $25 million from Saudi Arabia. A spokesman for the foundation has said that the money was not given while Clinton was secretary of state.
Now, Trump has switched from being a loud critic of Saudi Arabia to a friendly ally.
Although he campaigned against Muslims during the election — proclaiming that “Islam hates us” — he comes to Saudi Arabia with a speech preaching religious tolerance.
The Saudi leader also gave the president the highest of honor for a foreign dignitary, the collar of Abdulaziz al-Saud, named for the kingdom’s founder, which Salman hung on a thick gold chain around Trump’s neck.
One of the highlights of Trump's visit is a multibillion-dollar deal to modernize Saudi Arabia's military and cyber defense systems, as well as its airborne intelligence capabilities. The two leaders signed a letter of intent to “support Saudi Arabia's defense needs” and agreements for almost $110 billion in military purchases from the United States. These include naval ships, tanks and other military vehicles that were subject to agreements under previous administrations.
The relationship between the United States and Saudi Arabia was strained under Obama, whom the kingdom criticized for being too soft on Iran and for failing to push for the ouster of Syrian President Bashar al-Assad. Still, Obama also faced pressure from human rights groups over Saudi Arabia's history with abuses and repression.
Philip Rucker, Karen DeYoung and Abby Phillip contributed to this story.