When Vladimir Putin summoned the entirety of Russia's political elite to the St George's Hall of the Kremlin to announce that Russia would "welcome back" the territory of Crimea last week, the atmosphere was almost as if they were celebrating a military victory.

"In people's hearts and minds, Crimea has always been an inseparable part of Russia," said Putin, making it sound like it had always been a matter of time before Moscow made its move to recover the territory. "This firm conviction is based on truth and justice."

Some have seen Putin's actions in the context of a post-imperial complex and a leader longing to reconstitute some form of the Soviet Union by gathering up lost territories. There may be a flicker of truth in this, but the reality is more complex, according to those familiar with the Kremlin's decision-making over Crimea in recent weeks.

The evidence about how decisions were made over the past month points to reactive, adhoc and impulsive moves rather than the implementation of a strategic gambit long in the planning.

People rally in support of Crimea joining Russia, with banners and portraits of Russian president, Vladimir Putin, reading 'We are together'. Photograph: Pavel Golovkin/AP

Part of the issue comes from what the Russian president sees as a dangerously chaotic situation in Ukraine and Russia's complete loss of influence on the decision-making process in Kiev. The psychological element of seeing masked revolutionaries wiping their boots on the carpets at the ousted president Viktor Yanukovych's palatial compound is also likely to have had an effect on a ruler who has done everything to ensure that protest stirrings at home are nipped in the bud.

"Putin hates revolution, he's a counter-revolutionary by nature," says Gleb Pavlovsky, a former Kremlin-linked spin doctor. "Yanukovich was forced to flee, and the Russian system of influence on Ukraine ended. Putin realised that no one would listen to Russia if he didn't strengthen his position. So he strengthened it."

According to Sergei Markov, a Kremlin-linked analyst who has been taking part in official meetings with local politicians in Crimea, the initial plan was not to annex Crimea, and the final call to do so was taken only a fortnight ago.

"There are two major factors that played a role in the decision," he says. "The first was the demands of the Crimean elite, who did not want to end up like Abkhazia in international limbo and really pushed strongly to be part of Russia, and the second was the position of the west, who did not want to listen to any compromise."

Markov says Putin laid down several conditions to western leaders which he saw as a compromise solution but they viewed as unwarranted meddling in the internal affairs of a sovereign state. The conditions included ensuring that Ukraine's interim government involved a coalition of all political forces, including Yanukovych's Party of Regions, disbanding all armed revolutionary factions and making Russian an official state language.

"If this had happened, Crimea would still be part of Ukraine," says Markov.

As well as merely reacting to events in Ukraine, there was also a sense that the Crimea situation is a culmination of many years of grievances with what Putin sees as an unfair international system. "They say we are violating norms of international law … It's a good thing that they at least remember that there exists such a thing as international law – better late than never," said Putinlast week, to an ovation from the hall. "They have come to believe in their exclusivity and exceptionalism, that they can decide the destinies of the world, that only they can ever be right."

A man reads a newspaper with the headline 'Crimea chooses Russia' on a street in Simferopol. Photograph: Sergei Karpukhin/Reuters

What the world heard from Putin last week was not new in its thrust, but never has he spoken at such length and with such open contempt for the current international order. "I talked with his speechwriters and they said that he himself dictated the main points of the speech; it's his own deeply held position," says Yevgeny Minchenko, a political analyst close to the Kremlin.

Viewed through the spectrum of this discontent, Russia's actions in Crimea are essentially a petulant riposte to the west: we think you break international law all the time, so we will too.

The armed seizure of the Crimean parliament, the cynical insistence that Russian troops were not operating in Crimea when they clearly were, and the breakneck speed and flagrant violations involved in organising the Crimean referendum at short notice have been hidden behind a thread of plausible deniability stretched infinitesimally thin – and a knowing smirk on Putin's face.

"To keep the gloves on while everyone else allows themselves everything is not pragmatic," says Minchenko. "Putin has become more realistic."

Feeding into this irritation is also a deep-seated sense of injustice and unfair victimisation from the west that has long been a feature of Russian political thinking. Sochi is a particular sore point. The 2014 Winter Olympics was Putin's pet project, costing $50bn (£30bn), yet the build-up was permeated with noise about gay rights and security concerns from the west, and few heads of state visited the games, to the irritation of the Kremlin.

The Russian Railways boss, Vladimir Yakunin, a close associate of Putin's and now placed on the US sanctions list, said the west wanted "to befoul everything" to do with Russia and thus criticised the Sochi games; while the influential defence analyst Sergei Karaganov complained about an "avalanche of lies" about Russia over Sochi.

"People say that Putin doesn't care what the west thinks; that's nonsense," says Anton Krasovsky, a journalist who was chief of staff for the oligarch Mikhail Prokhorov when he ran against Putin in the 2012 presidential elections. "He does care, and he doesn't understand the hatred towards him from the west, which he feels has no basis. In Sochi, he organised what he saw as an incredible Olympics and people still criticised him for it. It's partly a generational and civilisational thing. He wishes he could go back to the era when he could just drink wine and have fun with Berlusconi. He just doesn't understand why people criticise him so much."

A number of those close to the Kremlin point to this genuine feeling of bewilderment about criticism and what is seen as an unwillingness to take Russia's interests into account. Over Crimea, it seems, the Russian president simply snapped, and decided it was time to act unilaterally.

The 2014 Winter Olympics was Putin's pet project, costing $50bn, yet the build-up was permeated with noise about gay rights and security concerns from the west.

"The feeling was that whatever we do, the west won't support it, so things can't get any worse," says Minchenko. "Putin was seriously disappointed with the attitude toward the Russian regime, first of all from US, but also from the European bureaucracy. Putin thought that Russia had taken too many steps toward compromise, but there weren't even any hints of acknowledgment."

Despite the staunch support for the move in Russia's parliament, it is clear the decision to seize Crimea was taken by a very small circle of people. Russian newspapers reported that all their government sources had been taken completely by surprise by the move.

The president now takes counsel from an ever-shrinking coterie of trusted aides. Most of them have a KGB background like the president and see nefarious western plots everywhere.

"There is a tremendous anxiety about Putin's decision-making and the erratic, impulsive behaviour," says Michael McFaul, who was US ambassador to Russia until last month. "Those that worry about the economy in Russia do not appear to be part of the decision-making process."

McFaul, a professional academic who works on Russia, describes Putin's worldview as "paranoid". The Russian president genuinely believes that the US is attempting to destabilise Russia, he says: "Putin assigns us all kinds of agency in Russia and across the world that we simply don't have."

'There is a tremendous anxiety about Putin's decision-making and his erratic, impulsive behaviour,' says Michael McFaul. Photograph: Misha Japaridze/AP

McFaul says he has been surprised by recent events: "We always thought of worst-case scenarios, but I did not expect it to go this far. I always thought of Putin as someone who doesn't like international norms, but operates within them and thinks that Russia is best off operating within them."

That the decision-making was adhoc does not mean it did not tap into aspirations that have long been bottled up among sections of the Russian elite. Putin's Ukraine point-man, the economist Sergei Glazyev, told the Guardian as long ago as September that if Ukraine were to sign the integration agreement with the EU, "political and social chaos" would ensue and Russia could be "forced to intervene" to protect Russians in the east and south. What happened after the successful revolution is so close to what Glazyev predicted might happen if Yanukovych had taken Ukraine westbound that it is tempting to think a contingency plan for a different scenario was taken off the shelf and activated.

The events of recent months have also solidified the hold of "Eurasianism" on the imaginations of Russia's top lawmakers. This ideology envisions Russia's re-emergence as a conservative world power in direct opposition to the geopolitical hegemony and liberal values of the west. The ideology was largely developed by Alexander Dugin, the son of a KGB officer who has become the wide-eyed prophet predicting a "Russian spring", as he called his recent plan for Russia's domination of Europe via Ukraine. Dugin serves as an adviser to State Duma speaker Sergei Naryshkin, a key member of the ruling United Russia party who has loudly supported Russian intervention in Ukraine, and has made widely viewed television appearances to discuss the Ukraine crisis alongside high-ranking members of the government. Glazyev is also an associate of Dugin's.

Upset with western criticism of him when he returned to the presidency for a third term in 2012, Putin realised that an independent Russia could never be part of the "western club" as he had previously wanted, says Dugin. "Putin sees the west as his main enemy, but to come to this conclusion he lived through a lot, he lived through a historical situation," Dugin said. "He came to the same conclusion in practice as we did in theory."

So far, the decision to seize Crimea has gone down well in Russia, evidenced by the seemingly endless ovations for Putin during his speech, and by his record-high approval ratings among the public. But some wonder just how sustainable this is. "In times of crisis, in times of us versus them, people always rally around their leaders and their flag," says McFaul. "That's what we saw after September 11 in the US. The fervour doesn't surprise me, and the propaganda works. But believe me: this stuff goes away pretty fast."

Additional reporting by Alec Luhn