The UK will increase its defence spending to 2.5% of GDP by the end of the decade, Boris Johnson has said.
As Nato members discussed their response to Russian aggression, the prime minister said the "cost of freedom" is "always worth paying".
It is expected to mean an extra £55bn by 2030, and could mean investments in future air combat capabilities for a "more dangerous" world, the PM said.
The defence secretary had reportedly called for a faster timescale.
Ben Wallace said in a speech on Tuesday that investment in defence had to grow "before it's too late".
But he later denied reports he had called for spending in 2028 to reach 2.5% of GDP - a measure of the size of the nation's economy - in a letter to the prime minister.
A source close to Mr Wallace said he was "very grateful" for the budget increase and had "always been clear that as the threat changes, so should defence spending".
Setting out his intention as the Nato summit in Madrid drew to a close, Mr Johnson said the country needed to "invest for the long-term in vital capabilities" such as air combat and adapt to "a more dangerous and more competitive world".
Tobias Ellwood, chairman of the Commons defence select committee, said ministers should listen to warnings from British Army chief Gen Sir Patrick Sanders that the world is in a "1937 moment" - referring to Europe's failure to confront the growing Nazi threat before World War Two.
"This timid increase over eight years shows we still don't appreciate the changing geo-political landscape and the scale of threats coming over the horizon," Mr Ellwood said.
"The funds are needed immediately to reverse cuts to troop numbers, tanks, ships and fast jets - not in eight years' time."
A spending rise to quell public grumbling
After a public and pretty noisy debate over defence spending in the last couple of days, there was a striking sentence in the prime minister's opening address at his news conference here in Madrid.
"The logical conclusion of the investments we propose to embark, of these decisions, is 2.5% of GDP on defence by the end of the decade."
This is well above the 2% demanded by Nato of its members.
I'm told the goal could mean an extra £55bn in total for defence, based on current projections of how the economy might grow over the next eight years.
Other sources acknowledge though that the precise number can't be known, nor the final costs of various projects or the big decision points between now and then - what are known as spending reviews.
But the prime minister will hope it can help quell at least some of the public grumbling from those claiming his words and promises don't match.
Last year, the UK spent £42.4bn on defence, which was a £2.5bn increase on the previous year.
The UK is now counting its support for Ukraine as part of its defence spending, bringing the current total to 2.3% of GDP.
GDP, or gross domestic product, measures the size of the economy by adding together the total value of all the goods and services produced. It stood at £2.1 trillion last year.
Addressing questions about spiralling inflation due to the war in Ukraine, Mr Johnson told a news conference "the cost of freedom, as it were, is actually always worth paying".
He said that, unless Russia is stopped, Russian President Vladimir Putin would be able to commit further acts of aggression against neighbouring countries, causing "further oil shocks, further panics and more economic distress for the whole world".
- AN APPLE A DAY: How the humble apple can help you live longer
- FOOD ADDICTION: Ultra-processed food and the global obesity pandemic