Ramzan Kadyrov, the 39-year-old leader of the Russian republic of Chechnya — and a man whose idea of expressing disapproval of a minister is to pummel him in a boxing ring — is looking for a new assistant. True to his flamboyant style, he will recruit one through an Apprentice-style reality TV show.

Behind Kadyrov’s thuggish and attention-seeking antics, though, is a surprisingly effective political operator who has just pulled off another political coup — to a large extent by turning Russian President Vladimir Putin’s own tactics against him.

For the leader of a declining country whose economy is shrinking and whose population is leaving in record numbers, Putin certainly punches (judo flips?) above his weight in foreign affairs. He does this in large part through a combination of bluff, will, and outright chutzpah: a willingness to break the rules that others still feel bound by.

At home, though, he seems to have met his match in Ramzan Kadyrov. While many places such as Ukraine have come under greater Russian influence in recent years, Kadyrov has managed to make the little region of Chechnya (only slightly larger than Connecticut) virtually independent from Moscow.

On July 2, Kadyrov formally announced — to nobody’s surprise — that he would seek another term in office as Chechen president this September, signaling the end of a behind-the-scenes power struggle with Moscow that Kadyrov has now clearly won.

Kadyrov tells the world he is Putin’s most loyal supporter, but in practice he has embarrassed his president, stolen millions from Moscow, and gotten away with it.

Grozny vs. Moscow

A small region along Russia’s southern border, Chechnya has been a problem for the Russians ever since they conquered it in the 19th century. The Chechens took every opportunity to try to break free from Russian rule, and when the Soviet Union broke up at the end of 1991 they declared independence, something Moscow felt it could not allow.

A first vicious war in 1994-’96 ended in a stalemate. A second, from 1999 to 2009, saw Chechnya brought back into the fold, but at terrible human cost — and by relying on defectors from the rebel side, led by Akhmad Kadyrov. After he was assassinated by a rebel bomb in 2004, his son, Ramzan, became first prime minister, then president of Chechnya.

This year has seen a sometimes bizarre battle of wills between Kadyrov and the Kremlin, though. Kadyrov has been Putin’s man in rebellious Chechnya since 2007. He has made Chechnya a haven of relative stability in the turbulent North Caucasus.

This is, however, a stability bought with Russian money and Chechen human rights. More than 80 percent of the Chechen Republic’s budget is provided by subsidies from Moscow, which have turned downtown Chechnya into a shining, high-rise (and virtually empty) architectural testament to Kadyrov’s vanity and enriched him and his cronies no end.

For a man whose last income return said he earned just 5 million rubles ($78,000), Kadyrov lives a high-rolling life with a stable of high-performance cars, including a $2 million Lamborghini Reventón, and his own private zoo.

At the same time, Chechnya is a police state controlled by the so-called "Kadyrovtsy," security forces technically subordinated to Moscow but in practice loyal to Kadyrov. Human Rights Watch this year warned that the authorities were "viciously and comprehensively cracking down on their critics."

That is hardly likely to bother Moscow. What was more alarming was Kadyrov’s increasingly aggressive and erratic behavior. In February 2015, Boris Nemtsov, a Russian politician opposed to the government of Vladimir Putin, was murdered literally in sight of the Kremlin. It became increasingly clear that the Chechens who were behind the hit were either acting on Kadyrov’s orders or at least subsequently protected by him.

While Putin would hardly miss Nemtsov, this was deeply embarrassing to him. There is an unspoken rule that while small fry are fair game, opposition leaders are not to be touched without orders from the Kremlin. At a time when Russia was already being pilloried by the West, it made Putin look either clumsily murderous or unable to control his own trigger men.

The heads of the Russian security agencies, united in regarding Kadyrov as a threat, had hoped Kadyrov’s actions would be enough to persuade Putin to abandon his protégé, but ultimately Putin backed away, lest he ignite another war in Chechnya.

Rather than being humbled, Kadyrov continued to up the ante. When a politician from Siberia called him "a disgrace to Russia" on Facebook, a gang of "representatives of the Chechen people" visited him to hint that he could suffer the same fate as Nemtsov, unless he publicly apologized. Kadyrov then went on to post a video on Instagram — his favorite means of communication — showing opposition politicians in a rifle’s crosshairs.

He even warned federal law enforcement that if they tried to come into Chechnya without his permission, his men would shoot to kill.

Kadyrov’s behavior is straight out of Putin’s own playbook. Putin challenges and threatens NATO, an alliance that outspends and outguns Russia, in the expectation that the West will back away from an open confrontation. He breaks the rules of international diplomacy, relying on his opponents not daring to call his bluff, in case matters spin out of control.

Likewise, Kadyrov was challenging Moscow openly, even though Moscow controls his purse strings and has 10 soldiers for every one of his. Instead, he was relying on Putin’s unwillingness – when his forces were already mired in Ukraine and Syria – to risk a third war in Chechnya.

But being allowed to quite literally get away with murder is one thing. What Kadyrov really wanted was much bigger: a promise that he would also continue to get Moscow’s money. After all, he needs that money not just for his own entertainment but also to buy off his cronies and trigger men.

So in February this year, he shocked everyone by offering to step down, saying maybe it was time for Putin to pick a new leader, so he could devote himself to his family, to Islam, maybe even join the army.

It was a disingenuous and daring piece of blackmail. Over the years, every Chechen who posed a plausible challenge to his rule has been murdered. Chechnya’s 30,000-strong security forces are known as the "Kadyrovtsy" precisely because they swear a personal oath to him.

By daring the regime to try to find a new Chechen leader, he was in effect forcing them to acknowledge that they could not. At the time, a Russian security official told me that "if anyone there even hints that he’d be willing to take Ramzan’s place, the Kadyrovtsy would throw his body in the Sunzha [River] next morning."

Advantage Kadyrov

Putin had to either accept Kadyrov and all his ways — his murderous habits, his private army, his massive embezzlement — or come up with an alternative to him and be willing to do whatever it took to put him in power and keep him there. Putin took the easy way out and declined to call Kadyrov’s bluff. Kadyrov graciously allowed himself to be convinced to stand again — for the good of the nation, of course — and because of his deep personal loyalty to the man he had just successfully blackmailed.

Kadyrov can assume he is all but untouchable now, and even while the federal budget is under serious pressure, and rebuilding Crimea has the highest priority, he will continue to get his money. While the headline figure for subsidies to Chechnya will appear lower, the government will find other ways to make up the shortfall.

Chechenneftekhimprom, the state-owned company controlling the republic's petrochemical infrastructure, is being transferred to Kadyrov’s control, for example, and a (redundant) new oil refinery may be built in Chechnya with federal money.

So his decision to stand for the Chechen presidency (which, one way or another, he will win, overwhelmingly) is really just the final expression of Kadyrov’s triumph. Putin has been "out-Putined," and while he has avoided an all-out clash with his Chechen warlord, he may well regret this in the future.

After all, not only is Kadyrov an erratic man who breaks the rules of Russian politics, he does so openly and triumphantly. He has shown that it is possible to challenge the Kremlin and win. At a time when budget pressures are increasing the tensions between have and have-not regions, and within the elite, what lessons do his triumphs offer to others looking to protect their positions and incomes?

Mark Galeotti is an incoming senior research fellow at the Institute of International Relations Prague, a visiting fellow with the European Council on Foreign Relations, and the director of Mayak Intelligence. He blogs at In Moscow’s Shadows and tweets @MarkGaleotti.

Ramzan Kadyrov: brutal tyrant, Instagram star