Video report by ITV News Correspondent James Mates
Boris Johnson urged Nato members to increase their military spending, amid criticism from Donald Trump that certain countries were not paying their fair share.
Under Nato guidelines, every member state is obliged to spend at least two per cent of their GDP on defence.
Yet only nine of the 29 member states are currently meeting the minimum requirement.
Speaking at the end of the Nato's 70th anniversary meeting near Watford, Hertfordshire, Mr Johnson said other states needed to meet the commitment in order for the military alliance to continue to thrive for another 70 years.
Mr Johnson said: "The UK has long argued that you can't be complacent about that, you can't remotely take that for granted.
"You have got to ensure that we continue to spend on our collective defence and that's why we have made the case for 2% of GDP is the minimum Nato spend for every member.
"We have been successful in that campaign and what has happened since the Cardiff summit in 2014. Actually, there has been a substantial increase in spending by our European friends, up 130 billion dollars (£99 billion). It will rise to 400 billion dollars (£305 billion) by 2024.
"At this meeting here today, country after country pledged or gave an account of how they were going to meet the pledge of two per cent. I was able to sketch some of the ways in which the UK leads in, for instance, the European contribution to the Nato readiness initiative."
He added: "There was a mood of very great solidarity and determination and a willingness to push Nato forward not just for the next few years but for the next 70 years, a real belief in the long-standing value of this alliance."
Earlier on Wednesday, the prime minister tried to act as peacemaker between Nato world leaders and play down rifts between countries.
French president Emmanuel Macron described the military alliance as "brain dead" in the build-up to Wednesday's summit, with Donald Trump firing back at the "very nasty" comments.
Mr Johnson also played down divisions within Nato amid differences over Turkey's incursion against the Kurds in northern Syria.
Canadian leader Justin Trudeau was branded "two-faced" by Mr Trump after a video published online appeared to show him talking about the US president.
On the 70th anniversary meeting of Nato leaders, Mr Johnson said Britain's commitment to the alliance remained "rock solid".
Mr Johnson said: "Seventy years on, we are rock solid in our commitment to Nato and to the giant shield of solidarity that now protects 29 countries and nearly a billion people.
"The fact that we live in peace today demonstrates the power of the simple proposition at the heart of this alliance: that for as long as we stand together, no-one could hope to defeat us - and therefore no-one will start a war.
"This essential principle is enshrined in Article 5 of the North Atlantic Treaty - that if any one of us is attacked, all of us will go to their defence. If Nato has a motto, it is, 'one for all, and all for one'."
"Clearly it is very important that the alliance stays together, but there is far, far more that unites us than divides us," he said.
The Prime Minister's "one for all, and all for one" echo the famous phrase of The Three Musketeers, a novel written by renowned French author Alexandre Dumas, will have pointed resonance for French President Emmanuel Macron.
Leaders from the 29 Nato member states have gathered at The Grove, a luxury hotel near Watford, where they are expected to discuss new threats including in the areas of cyber attacks and space.
The rise of China, which is now the world's second largest military spender, will also be high on the agenda.
Cracks within the Nato alliance starting to show
Mr Macron has been accused of playing the role of agitator-in-chief in the run up to Nato's 70th anniversary preparations after labelling the international military alliance "brain dead".
US President Donald Trump branded Mr Macron's comments as "very nasty" before the pair met on Tuesday at the US ambassador's residence in London.
Mr Macron's comments were prompted by Turkey's incursion against the Kurds in northern Syria without warning other Nato members.
Donald Trump arrives in Watford ahead of a Nato summit meeting on Thursday
The Kurds are regarded by most Nato members as key allies in the fight against so-called Islamic State (IS) - following the US decision to withdraw troops from the region.
Mr Macron later acknowledged in a tweet that his statements had "triggered some reactions" but said he stood by his remarks.
Boris Johnson and Donald Trump discuss trade
The US president confirmed he met with Boris Johnson on Tuesday night - with the topic of trade high on the agenda.
In a tweet published shortly after his arrival in Watford, Mr Trump tweeted: "Enjoyed my meeting with Prime Minister @BorisJohnson of the United Kingdom at @10DowningStreet last night. Talked about numerous subjects including @NATO and Trade."
The prime minister has come under fire from Jeremy Corbyn during the general election campaign, with the Labour leader accusing Mr Johnson of being willing to sell parts of the NHS off in trade talks.
Both Mr Trump and Mr Johnson both denied the accussations, with the US president saying he wouldn't want US involvement even if it was "served on a silver platter".
Mr Johnson said he had a "very good" bilateral meeting with Mr Trump.
"We discussed the future of Nato, we discussed what is going on in Syria and various other matters," he said.
Focus falls sharply on military spending
Donald Trump has repeatedly criticised Nato member states for failing to sufficiently invest in military spending.
Under Nato rules, countries are required to invest two per cent of GDP in their military - something Nato says only nine of the 29 countries currently do.
At the start of Wednesday's summit, Nato Secretary General Jens Stoltenberg said member states added an "unprecedented" $130bn to defence budgets, which would increase to $400bn by 2024.
Mr Johnson used his opening remarks to point out the UK was delivering on its pledge to invest sufficiently in its defence spending.
The prime minister said: "For the UK's part, we spend over two per cent of our GDP on defence, we are proud to be making the biggest contribution of any European ally to Nato's readiness initiative, by offering an armoured brigade, two fighter squadrons and six warships, including the Royal Navy's new aircraft carriers."
Mr Johnson deflected a question about US President Donald Trump's role in the security of the west by talking only about the past record of the US.
Responding to a question at a press conference after the meeting of Nato's 29 allies in Hertfordshire, the Prime Minister said: "I certainly think that the United States is the guarantor of, has been a massive contributor to Nato, has been for 70 years a pillar of stability for our collective security."
He said the US had stood "shoulder for shoulder" with the UK after the attempt on the life of former Russian military intelligence officer Sergei Skripal in Salisbury.
"You may remember country after country stepped forward to expel Russian diplomats - Russian spies - in solidarity with the UK. And the United States actually expelled 60.
"That was a fantastic testament, I think, to the trans-Atlantic alliance.
"American stood shoulder to shoulder with us then, has done for decades and is an invaluable ally and continues to be so."
What did Jeremy Corbyn says about Nato?
Questioned on whether he thought the UK was kept more secure by Nato, Labour leader Jeremy Corbyn said: "I think that Nato is an alliance that is important to be a part of and we are obviously members of it.
"I want to work with other Nato countries, I took the opportunity to meet representatives of many countries last night to discuss issues of tensions - tensions with Russia, tensions in Syria at the present time, and surely all the countries can work together to try and bring about a reduction in those tensions."
Asked again on whether Nato keeps the UK more secure, Mr Corbyn said: "We are secure when we have lower tensions with neighbours - obviously working with people all across Europe and the USA helps to do that."
Pressed on the issue, Mr Corbyn said: "Well Nato we are members of - it was created after the Second World War and it has changed its focus.
"I want it to be a focus that helps to bring about understanding and lowering of tensions around the world.
"A discussion with the French and others - I think there is quite a lot of discussion going in that direction at the present time."