|Former IRA commander Martin McGuinness, second left, now sits in government with his former enemies and sits down with the British government [File: EPA]
When I arrived in Northern Ireland, 17 years ago last month it appeared the violence there would never end.
The Irish Republican Army (IRA) was committed to its long war, the British were too strong militarily to be defeated and if, somehow, the two parts of the island ever became one, what had been a problem for the British government would become a problem for the new government of a United Ireland.
The militant loyalists – who had become increasingly well armed and much bolder – would do in the Republic what the Provos had done in mainland Britain for years.
Yet not more than two years later, I stood on the Falls Road in west Belfast on a warm August morning as Republicans celebrated an IRA ceasefire, a "cessation of all military activities".
It was an historic moment. It brought to an end 25 years of murderous violence and signposted the way things were to develop over the next 15.
Deals and discussions replaced bombs and bullets, and despite the spasms of those who feel there has been a sell out, Northern Ireland is largely at peace.
'Blood on his hands'
A former IRA commander is the deputy first minister in the devolved regional government.
Fifteen years ago, British and Unionist politicians wouldn't even shake hands with him, be in the same room as him or let his voice be heard on television or radio. They said he had "blood on his hands". It is a remarkable transformation.
"The definition of victory in Afghanistan includes allowing elements of the Taliban back into the political settlement"
former British foreign office minister
It seems a big leap from Northern Ireland to Afghanistan, but having covered both conflicts, there are striking parallels.
Eight years in, this is regarded as a war that cannot be lost because of the firepower that is available to the Americans and their allies and because of the message such a loss would send around the world.
Yet in many Western countries, politicians are fighting the perception that it is a war that cannot be won.
Bodies return to the UK weekly, six Italian deaths had Berlusconi talking about withdrawal, the French lost three in appalling accidents in bad weather, the Canadians have suffered substantial losses, and while Germany provides troops that are not involved in combat operations, the majority of people there want their armed forces home.
The number of Afghan dead still doesn't have a definitive number but it is high - and climbing.
Meanwhile, Hamid Karzai is being accused of securing victory in the presidential election by adopting the old Irish Republican mantra to "vote early, vote often".
Osama Bin Laden, the al-Qaeda leader, knows there are splits in the international operation. In September, he issued his second message in as many weeks, urging Europe to pull their troops out of Afghanistan.
He taunted leaders: "An intelligent man does not waste his money and sons for a gang of criminals in Washington. It is shameful to be part of an alliance whose leader does not care about spilling the blood of human beings by bombing villages intentionally."
The Americans know they are vulnerable to that allegation.
The new man in charge of operations in Afghanistan, General Stanley McChrystal, had talked about a change in operations, to cut civilians casualties, to present the operation as more a joint mission with the Afghans, and to improve basic infrastructure even in the most remote places.
But there is a growing feeling that any military changes need to be met with diplomatic changes as well.
David Miliband, Britain's foreign minister, has again talked openly of not just involving the Taliban in talks but having its representatives sit in government in Kabul.
Hamid Karzai has pleaded that any new strategy must include talking to the Taliban, even to Mullah Omar, the Taliban leader, who remains high on America's most-wanted list.
Low-level talks have been held between the Saudis and elements of the Taliban but nothing obvious has developed.
Definition of victory
Perhaps what has to be redrawn is the western definition of victory in Afghanistan.
|There is a growing feeling the military effort much be matched with diplomacy [EPA]
Hundreds of years and dozens of battles have shown that military victories are rare, so perhaps in the words of Lord Malloch-Brown, a former British foreign office minister and United Nations deputy secretary general: "The definition of victory in Afghanistan includes allowing elements of the Taliban back into the political settlement".
There are those who will howl and grab the headlines, calling this appeasement.
When Northern Ireland politicians were going through another of their crises, they went to South Africa to hear how they had transitioned from apartheid state to multiparty democracy, with all the baggage that entailed.
Martin McGuinness, the previously mentioned deputy first minister and former IRA commander, told me that one of the most striking things he heard was Nelson Mandela, South Africa's post-apartheid president, saying: "You make peace with your enemies not with your friends."
Britain has already fought one long war. It clearly believes lessons can be learned to avoid another.
Source: Al Jazeera