With Muammar Gaddafi's death a line has been drawn under his regime, though the fog of war is far from cleared. In the meantime, it has become politically expedient to decry the relationship fostered since 2003 between the last British government and Gaddafi's regime.

Former prime minister Tony Blair, officers from the British secret intelligence service, the London School of Economics (in the news again last week): all have been criticised for the personal relationships they built with senior Libyans, to the extent of being accused of turning a blind eye to human rights and other abuses.

The argument goes that Gaddafi's brutal reaction to Libya's Arab spring showed that the Libyan leopard had not really changed its spots. The British government had allowed itself to be duped, had drowned in a sea of wishful thinking. Therefore, the critics opine, British government efforts to bring Gaddafi in from the cold had been a gross error of judgment.

As one of a small handful of senior British army officers to have visited Tripoli in 2003 for talks with the regime – Moussa Koussa included – I saw some of these efforts at first hand. We were well aware of allegations laid at the door of Gaddafi's inner circle. But the potential prizes for successful engagement were great. World security – at least in part – depended on it.

In our first meeting the Libyans made a key point: "We really are giving up our programmes for weapons of mass destruction. The world is watching us. But it is also watching you: to see what you do in exchange. If you reward us well, other nations who have such programmes may also be persuaded to give them up. And you British will find this cheaper than going to war against them." When talking does fail, the western powers are sometimes left with no choice but to resort to costly military containment policies such as no-fly zones, which, according to a new report by the US-based Centre for Strategic and Budgetary Assessments, cost $6.53bn (in today's dollars) in Iraq from 1996-2001; $2.4bn for a three-month air campaign over Kosovo in 1999, and an estimated $1bn for the seven-month Nato no-fly zone over Libya.

Therefore communication, dialogue and the search for areas of common interest leading to a potential "win-win" solution should never be disregarded as an option. As Winston Churchill noted, "better jaw-jaw than war-war".

For such a strategy to work, building personal relationships is a necessary step. British negotiations over a host of international issues have shown this time and time again. Sometimes these relationships, once revealed, can be embarrassing. Thus the initially secret talks between the IRA and the British government at Sunningdale in 1973 were abandoned.

After that, it took more than two decades for negotiators to cover similar ground successfully, which eventually led to the Good Friday agreement. This inspired the memorable comment that "Good Friday was Sunningdale for slow learners".

A more recent example of how relationships, however distasteful and denied, had to be in place before a positive result could be realised were the negotiations between the Israelis and Hamas, which led to the exchange of Gilad Shalit for 1,027 Palestinian prisoners. Diplomacy and track-two negotiations (using academics and businessmen rather than government officials) without pre-conditions and kept under the radar of the media, is the most effective way governments can and do keep this world together.

We are seeing positive results coming out of that process in Burma, and it may currently be averting a crisis with Iran.

Since 2007, the Libyan government paid for more than 7,000 students to attend overseas universities. The Libyan educational outreach programmes enabled by the London School of Economics should be seen in the same light. Gaddafi's son, Saif-al-Islam, may have reverted to type when the chips were down, proving that blood is indeed thicker than water. Even so, the concept of influence that such a programme embodied was absolutely right. Lord Woolf's report may criticise particular aspects of the programme. And the results of the programme, on the ground, are unlikely to be neatly amenable to the modern Whitehall doctrine of "metrics".

But it is very plausible that the broader perspectives promoted through western educational programmes and other western contacts impelled key people in Gaddafi's circle to persuade him to give up his nuclear programme and his support for terrorists. And the same programmes may more recently have inspired some of the key leaders of Libya's National Transitional Council.

Thus our experience of Libya, both in the last few years of the Gaddafi regime and since, should remind us of the importance of communication and of building personal relationships with the other side – irrespective of the differences we hold – rather than to the contrary.