Speculation continues that Saudi Arabia’s Crown Prince Mohammed bin Salman may be forced from office, or severely diminished, as a consequence of the murder of Jamal Khashoggi in the Saudi Consulate in Istanbul earlier this month.

However, this outcome is highly unlikely, despite demands from some Western governments for a proper investigation and the decision by leading world finance officials and some global businesses to pull out of the international investment conference held in Riyadh on October 23–25. So strong a stance is unprecedented. However, even if this leads to more severe penalties should Prince Mohammed’s responsibility for the crime be proven, he will not only survive, but will also use the backlash to entrench himself further domestically.

When under pressure, autocratic rulers do not relinquish power, they double down, no matter what the cost, and Mohammed bin Salman is in a better position than most. Prince Mohammed’s consolidation of power since he became crown prince in June 2017 has drawn frequent comment. Yet much of the speculation about his prospects fails to note that in his parallel role as defense minister he has tightened his grip on Saudi Arabia’s military and security agencies.

Previously, these institutions functioned largely as separate fiefdoms headed by members of the royal family. In addition to preserving their individual stakes in the political order, the system allowed them to derive large fortunes from the construction and procurement contracts it generated. The reform and restructuring of the kingdom’s defense and security agencies remain a work in progress in improving their operational capabilities and performance, but they have enabled Mohammed bin Salman to dislodge all major rivals.

The most visible indication of this came in June and July 2017, when King Salman dismissed the then-interior minister, Prince Mohammed bin Nayef, and brought all counterterrorism and domestic intelligence agencies under a single new body, the Presidency of State Security (PSS), which reports to Mohammed bin Salman. Among the transferred agencies was the powerful General Investigations Department. In addition to taking over these bodies and roles, the PSS and subsidiary agencies—such as the National Information Center that was also transferred from the Interior Ministry—became both hubs and recipients of major investments in cybersecurity. This continued a trend of investing in spyware and digital espionage for use against dissidents that is today at least four years old, as a report published by the Toronto-based Citizen Lab has detailed.

Reorganization has been accompanied by a changing of the guard in the military and security officer corps. King Salman replaced the commander of the Royal Guard in July 2017, and in February 2018 he appointed a new chief of staff for the Saudi armed forces, as well as new commanders for the land forces and air defense. Along with the air force and navy commanders, they report directly to Mohammed bin Salman. According to an unpublished planning document cited by defense analyst Neil Partrick, 800 new officer appointments are planned by the end of 2019.

The elevation of a whole generation of younger officers who are already loyal to the crown prince or stand to benefit from the avenues he is opening up for accelerated promotion and meaningful command will further secure his position. This includes measures such as promoting the head of the PSS and his deputy to ministerial rank, and is reinforced by replacing Interior Ministry officers and officials tied to Mohammed bin Nayef with others loyal to Prince Mohammed.

Even where officers do not owe their appointments entirely to Mohammed bin Salman, as in the Saudi National Guard, retention of separate National Guard and Defense Ministries blocks threats from either. But the longer-term tendency points toward consolidation under Mohammed bin Salman, who as Partrick notes has no deputy defense minister but is in the process of expanding the ministry’s organizational structure with five new assistant defense ministers and three undersecretaries.

In parallel, Mohammed bin Salman has aggressively restructured and expanded the defense and security sectors’ economic and commercial interests. Saudi Arabia Military Industries (SAMI) was established in May 2017 as a defense subsidiary of the Public Investment Fund (PIF), the kingdom’s sovereign wealth fund that reports exclusively to Mohammed bin Salman. The General Authority Military Industries (GAMI) was set up in August 2017 to handle procurement for the Defense and Interior Ministries and other agencies such as the PSS. Both SAMI and GAMI come under an inter-ministerial committee chaired by Mohammed bin Salman.

While seemingly intended to curb corruption and excessive commission-taking in an enormously lucrative sector, these moves have deepened the transfer of assets and jurisdiction from potential rivals—such as the Interior Ministry’s portfolio of cyberintelligence affairs, which was transferred to the PSS. They have also provided Mohammed bin Salman with an additional financial asset, even when bodies such as SAMI have under-performed, since he is able to steer PIF-funded investments and contracts toward the defense and security agencies he favors. Prince Mohammed reinforced this trend by ordering a review of existing defense contracts in July 2018. This mirrored his revision or cancellation of massive civilian construction contracts since 2016, using his parallel power as chairman of the Council for Economic and Development Affairs.

These processes are incomplete and some may founder. It is not certain, for example, that the military’s planned Joint Operational Command—part of the roadmap for developing the Ministry of Defense endorsed by King Salman in July 2017—will come into being. But the cumulative effect is transformative: A previously segmented defense and security framework is being beaten into one that is more unitary, reflecting a similar direction in the Saudi state. What Prince Mohammed is doing is not an aberration or entirely new, being solidly anchored in internal changes in the economic and institutional spheres that have been years in the making.

Whatever the fallout of the Khashoggi murder, Mohammed bin Salman is well positioned to resist any internal attempt to dislodge him. Given the extent of Western economic entanglement with Saudi Arabia, it would take a level of wholly unimaginable international sanctions to dent his domestic position. And even if it did, Western governments would have to threaten the Saudi defense and security sectors with complete incapacitation before they would buck the trend that Mohammed bin Salman has been pursuing.