Moscow is going on a huge shopping spree for weapons and military equipment.

Russian defense companies boosted sales by more than 20% last year, driven by demand from the country's military, according to new data from the Stockholm International Peace Research Institute.

That compares with a 2% decline in sales globally, largely due to a weaker performance by American companies, which account for more than half of the world's arms trade.

Russia has begun investing heavily in upgrades to its military capabilities. President Vladimir Putin plans to spend more than 20 trillion rubles ($700 billion) bringing equipment up to date by 2025.

The modernization program is continuing despite an economic crisis that has already forced Russia to adopt an austerity budget for next year.

Defense and national security were the only departments to escape cuts of at least 5%. Spending on the military is set to rise by 85% between 2012 and 2017.

Russia's defense budget is now the third largest in the world, behind the U.S. and China.

Airfields, hundreds of fighter jets and a new fleet of battle tanks are in the works. Russia is also developing new long-range missiles, has acquired an advanced nuclear submarine and is working on eight new vessels for the navy, due for delivery by 2020.

Related: Kalashnikovs get new look to boost sales

Russia's relations with the West are the most strained they've been since the end of the Cold War. The U.S. and Europe have imposed sanctions against Russian companies and officials for annexing Crimea and providing support for rebels in eastern Ukraine.

The crisis in Ukraine could provide another boost to Russian arms sales.

"It is too early to say, but the conflict is likely to have an impact on some specific orders -- especially conventional ammunition," said Aude Fleurant, research director at the Stockholm institute.

Sanctions are unlikely to put much of a dent in sales at Russian defense companies, because they largely supply the domestic markets, or countries such as China and India.

But they have killed one $3 billion strategic deal, at least for now. France has halted the delivery of two Mistral warships until further notice.