When he came to power, Vladimir V. Putin methodically and ruthlessly went about assuring that there be no dissent among the top circles of political and business leaders in Russia. But the unity he insisted upon has been slackening, and on Monday President Dmitry A. Medvedev dared the well-regarded minister of finance, at a public meeting, to quit if he felt he couldn’t get along.

And later in the evening, that’s exactly what the minister, Alexei Kudrin, did.

Kudrin had taken immediate exception to the idea of serving under Medvedev once the president steps down next spring and assumes the role of prime minister, in what had looked just two days earlier like a well-oiled mechanism for Putin’s return to the top spot. Kudrin, a longtime Putin ally, reportedly wanted the prime minister’s job himself.

At a public meeting in the city of Dmitrovgrad Monday, Medvedev lashed out at Kudrin, who was also present. “You may consult with anyone, including the prime minister, but I am still the president and such decisions are made by me. You need to make your decision very quickly and give me an answer today,” Medvedev told Kudrin.

Kudrin didn’t reply but later handed in his resignation through Putin’s office.

Kudrin has won wide respect, here and abroad, for his handling of Russia’s huge oil revenue, putting billions of dollars aside into a reserve fund that, although now dwindling, stood the country in good stead during the worst of the economic troubles that began in 2008. Medvedev, on the other hand, never got out of Putin’s shadow, and when he and Putin announced Saturday that they intend to switch jobs it seemed an unmistakable sign of Putin’s lack of confidence in him.

The surprise was that Kudrin tested that lack of confidence only a day later. In Washington, according to various reports, he said that he disagreed with Medvedev’s desire to increase military spending. But up to now there’s been no public difference between Putin and Medvedev on defense spending, at least in public. Quietly, and gradually, they have been carrying out far-reaching reforms that have angered many in the upper echelons of the officer corps. Putin on Saturday promised a thorough upgrading of Russian armaments in the next five to 10 years.

Kudrin predicted Monday that the price of a barrel of oil would drop to $60 next year, which would do severe damage to Russia’s budget. “We expect this fall will certainly cause a decrease in our economic growth down to nearly zero or below zero, but in terms of the budget policy we’ll be able to cope with this for up to a year,” Kudrin said, according to the RIA Novosti news agency.

It looked like a message to Putin: Do you want to stick with Medvedev, whom you’re demoting, or with a finance minister who has a proven track record handling complicated problems?

Medvedev apparently felt he couldn’t afford to let Kudrin’s challenge slide. Between the two of them, Kudrin had to go, because otherwise Putin’s political strategy would have been in question. This is exactly the sort of headache Putin loathes, as much as he might have played a part in bringing it about.