Ibrahim al-Assaf, a former finance minister, was appointed foreign minister.

It was not immediately clear why Mr. Jubeir’s role was changed. Despite coming from a nonroyal background, he had held some of the kingdom’s leading positions for maintaining its relationship with the United States, its most important ally.

Mr. Jubeir, who earned a master’s degree in international relations from Georgetown University, has held a number of diplomatic posts. He rose to prominence by voicing the kingdom’s perspective to the West, including during the Persian Gulf War of 1990-91 and after the terrorist attacks of Sept. 11, 2001. Most of the perpetrators of those attacks were Saudis.

He served as a translator for the previous monarch, King Abdullah, who named him ambassador to Washington. After King Salman ascended to the throne in 2015, he named Mr. Jubeir foreign minister, a job that many at the time did not expect him to hold for long because he was not a prince.

Mr. Jubeir’s replacement, Mr. Assaf, is not as well known internationally. After serving as finance minister, he was locked in the Riyadh Ritz-Carlton last year with hundreds of princes, businessmen and officials in what the government called an anti-corruption campaign.

After his release, he attended a cabinet meeting and then joined the Saudi delegation to the World Economic Forum meeting in Davos, Switzerland. Neither he nor the Saudi government has ever publicly explained why he was detained.