Theresa May has extended the commitment of British forces in support of counter-terrorism operations in Mali, hailing the military as the "protectors of our democracy".
Three Chinook transport helicopters and their crews have been based in the African country since July last year in support of French operations against extremists.
The Prime Minister announced a six-month extension to the operation as she delivered her final military speech before leaving office later this month.
She visited the UK's Permanent Joint Headquarters (PJHQ) and NATO's maritime headquarters in Northwood, north-west London, to thank the military for their efforts under her premiership.
Mrs May said: "There is no greater responsibility as Prime Minister than ensuring the safety and security of our people.
"And doing so is not something any Prime Minister can achieve without you - the brave men and women of our armed forces.
"You are not just a part of British life - you are the guarantors of British life. The foundation of our freedom. The protectors of our democracy. And for that, we owe you a debt of gratitude."
She stressed the continued importance of NATO in dealing with the international threats facing the UK.
"While the threats we face may vary and evolve, the founding principles of NATO - that we are mightier together than alone and that an attack on one is an attack on all - remain every bit as important and relevant today as they were in 1945," said the Prime Minister.
"Terrorists, people traffickers, international criminals and state and non-state aggressors do not respect national boundaries, and nor should our response to the threats they pose."
Mrs May's speech highlighted her visit to Iraq in 2017, where she met troops involved in training local forces.
She also praised the Armed Forces for their "round the clock" role in decontaminating Salisbury after the nerve agent attack on Sergei Skripal and his daughter Yulia in March 2018.
Mrs May acknowledged an increase of defence spending by £1.8 billion, adding: "Because our Armed Forces are the best, the deserve the best."
But the speech concluded with a tribute to the many who are devoted to the UK military: "Any nation's military can acquire expensive kit. What makes ours so special is its people, and it is people that are the reason for my visit here today.
"You are the best in the world, and I wish you all the very best for the future. Thank you."