EU military spending reached a record 240 billion euros ($260 billion) last year in the face of Russia's war on Ukraine, the bloc's defence agency said Thursday.

The figure represented an overall increase of six percent on 2021 as the EU's 27 member states ratcheted up their purchases of new hardware.

The European Defence Agency (EDA) said six countries had increased their spending by over 10 percent, with NATO applicant Sweden splashing over 30 percent more.

"Our armed forces must be ready for a much more demanding era," said EU foreign policy chief Josep Borrell, who heads the EDA.

"Adjusting to these new realities first and foremost means investing more on defence," he added.

But Borrell warned that despite the increases the bloc still faced "key capability gaps" and continues to "lag behind other global players".

Moscow's all-out invasion of Ukraine in 2022 provided Europe with a wake-up call that it needed to pump more into defence to be able to confront the threat of its bellicose eastern neighbour.

After decades of decline following the end of the Cold War, spending had already begun increasing each year since the Kremlin's 2014 seizure of Crimea from Ukraine.

Russia's government has announced a massive 68 percent hike in its military spending for 2024 meaning it will account for almost a third of all its outlays.

The EDA said in its annual report that an all-time high of 58 billion euros was allocated in the EU to defence investments in 2022, "overwhelmingly towards the procurement of new equipment".

But there had been a slight decrease in the amount spent on research and technology development.

EU countries have drained their stockpiles sending weaponry worth tens of billions of euros to Ukraine to help it fight Russia.

Brussels has been scrambling to get European defence companies to ramp up their production to cope with the new demands sparked by the war.

The EU has pushed member states to sign joint contracts and countries have begun clubbing together to order howitzer shells for Ukraine and their own forces.

But building industrial capacity is taking time and the bloc is expected to fall short of a 12-month target of sending one million shells to Ukraine by March.