Boris Johnson vowed to make Britain the biggest naval power in Europe.
He also said global security is in its most perilous state since the Cold War.
The prime minister announced a multibillion-pound plan to bolster the nation’s defence forces after years of cost-cutting.
He told MPs: “The era of cutting our defence budget must end and it ends now.
“Our national security in 20 years' time will depend on decisions we take today ... the international situation is now more perilous and intensively competitive than at any time since the Cold War.”
Mr Johnson said the four-year deal was worth £16.5 billion ($21.9bn) in new funding.
His ambition, he said, was to “end the era of retreat, transform our armed forces and bolster our global influence”.
He said that he wanted to “restore Britain's position as the foremost naval power in Europe”, claiming the funding would "spur a renaissance of British shipbuilding across the UK".
"If there was one policy which strengthens the UK in every possible sense, it is building more ships for the Royal Navy," he said.
Labour Party leader Sir Keir Starmer welcomed the increased spending but asked if it would be funded through tax rises.
Defence Secretary Ben Wallace said some funding would be generated by retiring old assets but admitted some details were unknown to him.
He told Sky News: "I don't know where we are going to get the money insofar as I don't know whether the chancellor has made a decision on the foreign aid budget or other budgets.
"That will be revealed next week."
The extra £16.5bn pumped into the Ministry of Defence budget goes beyond the Conservatives’ manifesto commitment. The government had already pledged to increase defence spending by 0.5 per cent above inflation for every year of this parliament.
Mr Johnson also announced a new agency dedicated to artificial intelligence, the creation of a National Cyber Force to protect the country's people from harm and a new Space Command with the potential capability to launch Britain’s first rocket in 2022.
There will be an additional £1.5bn of spending on military research and development and a commitment to invest further in the Future Combat Air System.
The announcement will allow Britain’s MoD to invest in next-generation military capability.
Since the Cold War, traditional defence and deterrence remain vital, although there has been an increased threat through other mediums, such as terrorism and cyber attacks.
The British government says this new investment will help sharpen its technology to allow it to better respond to such attacks.
Over the course of the coronavirus pandemic in the UK, more than 20,000 military personnel have been made available to deliver personal protective equipment, run Covid-19 testing sites and ensure those in the most remote areas receive the medical care they need.
The defence department has also been on the front line responding to international humanitarian disasters.
In the last year alone, HMS Enterprise was sent to help Lebanon after the explosion at the Port of Beirut, RFA Argus and Army personnel delivered disaster relief to Central American countries ravaged by Hurricane Eta, and the RAF transported vital medical supplies to communities struggling against coronavirus in West Africa and British Overseas Territories.
“I have taken this decision in the teeth of the pandemic because the defence of the realm must come first,” Mr Johnson said.
“Britain must be true to our history and stand alongside our allies. To achieve this, we need to upgrade our capabilities across the board.
“This is our chance to end the era of retreat, transform our armed forces, bolster our global influence, unite and level up our country, pioneer new technology and defend our people and way of life.”
The military spending announcement marks the first conclusion from the integrated review of the UK’s foreign, defence, development and security policy.
Full conclusions of the review are expected to be announced in the new year.
The recent defence spending increase may come as a surprise to some, as Britain is on the verge of a public debt crisis. The government borrowed a record £35.9bn in August as the cost of combating Covid-19 took its toll on the country's public finances. It is the highest amount borrowed in the month since records began in 1993.
In another record, the UK borrowed £173.7bn since the start of the fiscal year in April, topping the £157.7bn set in the 12 months ending March 2010.
Critics of the move pointed out that some of the military spending has come from funding cuts for UK aid, following the merger of the Foreign Office and the Department for International Development this year.
Prof Malcolm Chalmers, deputy director general of Royal United Services Institute (Rusi), said the budget announcement was “a remarkable tribute to the persuasive powers of the Ministry of Defence”, given the economic uncertainty of Brexit and the pandemic.
"This increase – amounting to between 10 per cent and 15 per cent more in real terms by 2024 – is the largest that defence has received since the early 1980s. This will go down well in the new US administration and with the UK's Nato allies,” he said.
Dr Karin von Hippel, director general of Rusi, said: “This announcement demonstrates that the UK remains committed to playing an important role on the global stage. It will be welcome news to the incoming Biden administration, which will be shifting away from the 'America Alone' mantra of the Trump administration on day one, and back to working closely with allies.”
Defence Secretary Ben Wallace said that he would provide more details on the UK’s defence agenda in the coming months.
The UK has the largest defence budget in Europe and the second largest in Nato.