The fate of Saudi Arabia's former crown prince, Mohammed bin Nayef, may have been sealed in March after his rival met with President Trump at the White House for a formal lunch.

President Trump met with Mohammad bin Salman, the 31-year-old son of Saudi Arabia’s King Salman. It was considered an unusual move and the media speculated on its significance.

King Salman, who is 81, is reportedly in declining health and there was a power struggle between the two princes. Politico, in an article titled, “Trump Drawn into Saudi Game of Thrones,” wondered, at the time, if Trump crossed some political line during the meeting.

“I don’t think that was necessarily his intention,” Joseph W. Westphal, a former U.S. ambassador to Saudi Arabia under President Obama, told the magazine. “He is new at all of this, and I think he was probably trying to signal a warm welcome, but it was unusual and it could definitely signal to people back in Saudi Arabia that there is an effort being made there.”

Whether there was a effort or not, Saudi Arabia’s King Salman’s announced Wednesday that his son will be his heir-apparent. He stripped his son's former rival of his position of counter-terrorism chief.

It was not immediately clear what prompted the decision, but analysts see the royal family attempting to forge a solid relationship with Trump after rocky years with the Obama administration.

Saudi Arabia and the Obama administration did not see eye-to-eye on some major issues. The Iran nuclear deal was widely criticized in Riyadh.

Trump and Prince Mohammad bin Salman, during the meeting in March, reportedly touched on a series of topics and agreed that Iran is a major threat. After the meeting, a senior adviser to the prince said in a statement that the meeting was a “turning point in relations between both countries.”

The Associated Press reported that the warm ties forged between Riyadh and the Trump administration may have helped accelerate Prince Mohammed bin Salman's ascension as crown prince. The visit also helped lay the foundation for Trump's visit to Saudi Arabia in May, which marked the president's first overseas visit.

Simon Henderson, the director of the Gulf and Energy Policy Program at the Washington Institute, told The New York Times that Trump and his team “see Saudi Arabia as a crucial part of the Middle East and an important country to have a positive relationship with, even if there are irritants. This is at odds with the Obama administration, so they want to make that clear distinction.”

The all-but-certain takeover of the throne by Prince Mohammed bin Salman awards near absolute powers to a prince who has ruled out dialogue with rival Iran, has moved to isolate neighboring Qatar for its support of Islamist groups and who has led a devastating war in Yemen that has killed thousands of civilians.

Prince Mohammed bin Salman raised eyebrows in the past when he framed the tensions with Iran in sectarian terms, saying it is Iran's goal "to control the Islamic world" and to spread its Shiite doctrine.

One of Prince Mohammed bin Salman's key jobs will be an economic one: to lessen The Kingdom's reliance on oil.

Faisal J. Abbas, the editor of Arab News, wrote in March, “The new Saudi spirit, embodied in the deputy crown prince, is one that means business, and has made reform and progression its main mandate (compared to Tehran, which has only used the money from the nuclear deal to further spread chaos and terror in the region).”

The Associated Press contributed to this report