Sir John Redwood is MP for Wokingham, and is a former Secretary of State for Wales. He blogs at John Redwood’s Diary.

Four hunded and fifty-seven members of the UK military  were killed in Afghanistan this century. We have to ask: why did they die?

War is a continuation of diplomacy and politics by violent means. A decent nation only fights a war when talking has failed, when the cause is just and when force is the only language the wrongdoers understand. Success lies in fighting fewer wars.  Having well resourced and respected armed services is a vital part of our nation’s security and diplomatic weight. Because we have fought victoriously in the past and show resolve in the present we have more chance of negotiating and preserving the peace.

The Falklands War is a perfect example of how a successful war is sometimes necessary and can right an obvious wrong. The unwarranted and illegal invasion of the islands against the wishes of practically every Falkland islander had to be reversed. International diplomacy failed. The Argentinians were unwilling to listen to peace proposals that required that they respect the right and wish of the islanders to enjoy self-government.

A dangerous military campaign was brilliantly executed by UK forces. Peace was re established as soon as the last Argentinians surrendered ,and has endured ever since. The 258 UK deaths were not in vain. The nation took pride in their achievements. The world is a better place for us showing once again that violent annexation of a country and the termination of its freedoms is unacceptable conduct which will be reversed. We had to do it on our own, since there were divided views amongst other nations, despite the abuse of force by Argentina.

Three hundred and eighty-three thousand of our military lost their lives in the Second World War. The vast scale of the death and destruction acts as a warning to the generations that follow to give diplomacy and politics every chance of success in disputes between the great powers.  Today, technology has delivered even more terrifying capacities by which armed forces can kill huge numbers of people and destroy whole cities, making sensible politicians of the best-armed countries even more reluctant to resort to war with each other.

The nation as a whole thinks those who lost their lives between 1939 and 1945 did so for a just cause with an eventual good result.  Individual deaths may have resulted from poor planning or bad decisions by the command. More may have died because of bad intelligence, inadequate force or even friendly fire. The pressures of total war and the ruthless ingenuity of the enemy set each of those difficult deaths into a wider and more understandable  context. There is virtual unanimity that there was no feasible negotiated peace available in 1939 that would have prevented the violent annexation of Europe by Germany, or that would have prevented the genocides which followed.

The relatives and friends of the 457 fallen in Afghanistan need to be reassured that our nation is proud of them, too. The immediate cause of NATO’s Afghan war was the unprovoked and shocking attack of terrorists on the United States, with mass civilian casualties. The USA had good intelligence that Afghanistan harboured evil men, and the Afghan government was unable to offer assurances that it would find and prosecute the guilty.

The early NATO campaign was successful and the government was overthrown. NATO then sought to support the creation of a government for the country chosen in free elections and capable of giving a better life to the many. Economic recovery and better treatment of women and girls followed. As a result many Afghans enjoyed an improved life over the last two decades. The deaths of our troops made that possible. Their achievements should not be forgotten.

The issue for NATO and the politicians is: why did the politics fail this year? War is a means to a better end. It is the means to rebase politics which have gone wrong, and to change personnel where government has fallen into evil hands. It is a way of overthrowing dictatorial constitutions and tyrants.

This was done in Afghanistan. Unfortunately the decision of Joe Biden to remove US forces late one night without proper consultation, let alone agreement from the Afghan government and allies, led to the rapid collapse of democratic government in Afghanistan. The sad scenes of a scrambled exit for the rest of the allies and friends of  NATO at Kabul airport led on to triumphant displays of Afghan gunmen showing off captured NATO uniforms and weapons. The return of the Taliban leaves the USA weakened, and the NATO allies visibly sidelined. It plunges many in Afghanistan into despair.

Until the withdrawal in recent years, NATO had been able to offer limited support and advice to the security forces of the Afghan state, and to keep its own military personnel in the country largely out of harm’s way. It was a relatively cheap way of defending democracy and basic freedoms in a troubled part of the world, and was only undertaken because the elected government wanted NATO to help them keep order. What followed a botched exit by the President was a needless disaster of his own  making. None of this should detract from the bravery and good intentions of our forces in the twenty years of supporting the elected Afghan government.

Since 1945, the UK has been involved in a lot of more limited wars. In each case, we need to ask: why did we use lethal force against others and why did UK service personnel die? We might conclude that we have intervened too often. We should certainly conclude that there have been some bad political and diplomatic failures.

War should only be a last resort and should only be used where there does need to be a decisive change which cannot be achieved by talking. There is plenty of collateral damage from warfare – that is elite talk for more people losing their lives and more property and livelihoods being demolished, as others disagree violently. We need to get better at talking and persuading, if needs be with realistic threats that we would rather not carry out. People need to know we can and will use force as a last resort as we seek to show them that there are better ways for them as well as us.