Gordon Brown today arrived in Afghanistan as a key battle continued to take a Taliban-controlled town.
The Prime minister flew in as troops fought in Musa Qala just 70 miles away.
The Prime Minister praised the courage of troops injured in the assault and paid tribute to the two killed.
Speaking at their Camp Bastion base, Mr Brown told 150 of the UK's 6000 troops in the country: "I want to thank all those who have been injured for their service and I want to remember all those who have given their lives in the service of their country."
Mr Brown spoke to members of 40 Commando Royal Marines, whose comrades have been involved in the fiercest battle faced by British forces in the country so far.
He told them: "I want to thank every one of you for what you have done in what is the front line against the Taliban.
"This is one of the most challenging of environments, this is one of the most difficult of tasks, this is one of the most testing of times."
The Prime Minister said: "When I speak of courage, I speak of men and women here who have shown huge bravery in really difficult circumstances.
"I know this weekend in Musa Qala some of you here have been doing a very important job in clearing the Taliban from that area.
"I know that the work you are doing today and in the next few days is important for the whole future in Afghanistan.
"If we can succeed there it will mean we can move forward events in Afghanistan in favour of a more peaceful future for this country.
"People in Britain are incredibly proud of what you are doing."
He stressed the troops' efforts were recognised "in every community of the country".
The visit came amid indications that Mr Brown will this week signal a "change of gear" in Afghanistan.
The Prime Minister will make a statement to MPs this week, putting pressure on other countries to carry more of the military burden.
While British, US, Dutch and Canadian forces are bearing the brunt - another UK soldier, sergeant Lee Johnson of 2nd Battalion The Yorkshire Regiment, lost his life at the weekend - pressure is mounting on others, including Norway, Germany and Poland, to do more.
On Friday in Edinburgh, senior ministers from Nato countries involved in Afghanistan will meet to take stock. It is likely that Des Browne, the Defence Secretary, will do some gentle arm-twisting to get more allies to commit troops to the combat missions. Britain currently has 7500 troops in Afghanistan.
Speaking from Kabul where he met Abdul Rahim Wardak, his Afghan counterpart, Mr Browne said: "There still is a need to meet the demands set by both the Nato and International Security Assistance Force (ISAF) commanders as to what the minimum amount of troops and support are.
"What is known as the requirement' has not yet been met and that is something we continue to discuss with our allies and friends in the international community, who can help provide additional support in Iraq and what the military effort needs."
Mr Browne said the allied attempt, led by the Afghan army, to retake Taliban stronghold Musa Qala, was a "very important operation" to remove the "scourge" of the extremists from the area.
"This is a long-term project. I don't personally feel any sense of disappointment that we have made this much progress in six years. In fact, the ISAF commitment across the whole country is only 12 months old," he told the BBC.
"From my own observations in five visits over 18 months, we have seen some significant progress. There are still a lot of challenges and I understand the insurgency is still strong in parts. But every day we have met it, we have overmatched it.
"Over this winter again we will see another significant shift in our ability to create security, which I hope the Afghans can then take advantage of."
Why are you making commenting on The Herald only available to subscribers?
It should have been a safe space for informed debate, somewhere for readers to discuss issues around the biggest stories of the day, but all too often the below the line comments on most websites have become bogged down by off-topic discussions and abuse.
heraldscotland.com is tackling this problem by allowing only subscribers to comment.
We are doing this to improve the experience for our loyal readers and we believe it will reduce the ability of trolls and troublemakers, who occasionally find their way onto our site, to abuse our journalists and readers. We also hope it will help the comments section fulfil its promise as a part of Scotland's conversation with itself.
We are lucky at The Herald. We are read by an informed, educated readership who can add their knowledge and insights to our stories.
That is invaluable.
We are making the subscriber-only change to support our valued readers, who tell us they don't want the site cluttered up with irrelevant comments, untruths and abuse.
In the past, the journalist’s job was to collect and distribute information to the audience. Technology means that readers can shape a discussion. We look forward to hearing from you on heraldscotland.com
Comments & Moderation
Readers’ comments: You are personally liable for the content of any comments you upload to this website, so please act responsibly. We do not pre-moderate or monitor readers’ comments appearing on our websites, but we do post-moderate in response to complaints we receive or otherwise when a potential problem comes to our attention. You can make a complaint by using the ‘report this post’ link . We may then apply our discretion under the user terms to amend or delete comments.
Post moderation is undertaken full-time 9am-6pm on weekdays, and on a part-time basis outwith those hours.
Read the rules hereComments are closed on this article