In a series of royal decrees carried on the state-run Saudi Press Agency, the monarch stripped Prince Mohammed bin Nayef, who had been positioned to inherit the throne, from his title as crown prince and from his powerful position as the country's interior minister overseeing security.
The newly announced Crown Prince Mohammed bin Salman already oversees a vast portfolio as defense minister and head of an economic council tasked with overhauling the country's economy. He had previously been the second-in-line to the throne as deputy crown prince, though royal watchers had long suspected his rise to power under his father's reign might also accelerate his ascension to the throne.
The young prince was little known to Saudis and outsiders before Salman became king in January 2015. He had previously been in charge of his father's royal court when Salman was the crown prince.
The Saudi monarch, who holds near absolute powers, quickly awarded his son expansive powers to the surprise of many within the royal family who are more senior and more experienced than Mohammed bin Salman, also known by his initials MBS.
The royal decree issued Wednesday stated that "a majority" of senior royal members from the so-called Allegiance Council supported the recasting of the line of succession. Saudi Arabia's state TV said 31 out of 34 of the council's members voted in favor of the changes.
The Allegiance Council is a body made up of the sons and prominent grandsons of the founder of the Saudi state, the late King Abdul-Aziz, who vote to pick the king and crown prince from among themselves.
Over the weekend, the king had issued a decree restructuring Saudi Arabia's system for prosecutions that stripped Mohammed bin Nayef of longstanding powers overseeing criminal investigations, and instead ordered that a newly-named Office of Public Prosecution and prosecutor report directly to the monarch.
Mohammed bin Nayef was not believed to have played a significant role in Saudi and Emirati-led efforts to isolate Qatar for its support of Islamist groups and ties with Iran.
The prince had appeared to be slipping from public eye as his nephew, Mohammed bin Salman, embarked on major overseas visits, including a trip to the White House to meet President Donald Trump in March. That visit to Washington helped lay the foundation for Trump's visit to Saudi Arabia in May, which marked the president's first overseas visit and which was promoted heavily by the kingdom as proof of its weight in the region and wider Muslim world.
Saudi-US relations had cooled under the Obama administration after Washington pursued a nuclear accord with Shiite-ruled Iran that the Sunni-ruled kingdom strongly opposed.
The warm ties forged between Riyadh and Washington under the Trump administration may have helped accelerate Mohammed bin Salman's ascension as crown prince.
Despite his ambitions, which include overhauling the kingdom's economy away from its reliance on oil, the prince has faced failures and strong criticism for the Saudi-led war in Yemen, which he oversees as defense minister.
The war, launched more than two years ago, has failed to dislodge Iranian-allied rebels known as Houthis from the capital, Sanaa, and has had devastating effects on the impoverished country. Rights groups say Saudi forces have killed scores of civilians and have called on the US, as well as the UK and France, to halt the sale of weapons to Saudi Arabia that could be used in the Yemen war.
The US already is helping the Saudis with intelligence and logistical support for the bombing campaign in Yemen, and the Trump administration has signaled it could assist with greater intelligence support to counter Iranian influence there.
The newly-minted crown prince also raised eyebrows when he ruled out any chance of dialogue with Iran. In remarks aired on Saudi TV in May, Mohammed bin Salman framed the tensions with Iran in sectarian terms, and said it is Iran's goal "to control the Islamic world" and to spread its Shiite doctrine. He also vowed to take "the battle" to Iran.
Iran and Saudi Arabia's rivalry has played out in proxy wars across the region. They back opposite sides in the wars in Syria and Yemen and they support political rivals in Lebanon, Bahrain and Iraq. The conflicts have deepened Sunni-Shiite enmity between hard-liners on both sides.