That bargain held for years. But the war in Ukraine unsettled the balance. Mr. Prigozhin, sensing an opportunity to advance his career, began to challenge the military leadership. When the conflict between the two became untenable, Mr. Putin’s preference was plain: He unambiguously sided with the army. In January, he emphasized that the war ought to be fought in line with the general staff’s strategy, a clear hint that Wagner should be subordinate. By June, all Wagner fighters who wished to remain in Ukraine were expected to formalize contracts with the defense ministry and accept the supervision of its generals. It proved to be the final straw. Rebellion soon followed.

It was a humiliating blow to Mr. Putin’s regime. The pain came less from the betrayal by Mr. Prigozhin, who’d always been erratic, than from Mr. Putin’s personal responsibility for the disaster. On the state’s dime, the president had nurtured an entity that he didn’t keep in check. The mutiny, following Mr. Putin’s inability to manage the escalating tensions between the defense ministry and Wagner, was a direct result of this fundamental failure.

The political toll was considerable. In the fallout, Mr. Putin found himself yielding to Mr. Prigozhin, compromising his own stature and enduring public indignity. He was now confronted with a thorny dilemma: how to dismantle a private army without provoking political backlash or violence. In the rebellion’s aftermath, the Kremlin’s primary concern was to neutralize Wagner, both politically and militarily, with the aim of restoring the stability of the state.

The first step was to play for time. Under the agreement that quelled the mutiny, Mr. Prigozhin secured his freedom and Wagner members were protected from being charged for their participation, astonishingly enabling them to travel freely as if nothing had happened. This approach, in hindsight, appears logical: Mr. Putin aimed to mollify Mr. Prigozhin, giving him the sense that he was irreplaceable and that he enjoyed the state’s protection.

This was critical in ensuring Mr. Prigozhin’s exit from Russia. That allowed the clamping down on some of his Russian assets and the stripping back of access to lucrative contracts (even though his business did not collapse entirely). More important, Mr. Prigozhin’s departure was a prelude to the disbanding of Wagner. The most dedicated Wagner troops, a contingent of around 5,000, were coerced to relocate to Belarus under a new leader, the loyal and compliant Andrei Troshev; the group’s heavy artillery was returned to the defense ministry; and the hesitant were forced either to enlist with the military or to return home. In Africa and Syria, Wagner forces have been put under close oversight with a plan to gradually absorb their projects into the security services and defense ministry.