Tony Blair attributes his success as a conflict mediator to his ability to absorb the "sense of pain" felt by participants and his skill in transmitting raw emotions from one side to the other.

The former prime minister says mediators can only bring opponents together if they can understand their suffering on an "empathetic level".

Blair was appointed in 2007 as envoy for the Middle East Quartet of the US, EU, UN and Russia - which aims to mediate a peace process in the Israel-Palestine conflict - after his success in brokering a political settlement in Northern Ireland.

In a new foreword to the latest volume of diaries by Alastair Campbell, which focus entirely on the Northern Ireland peace process, Blair writes that the main participants in the negotiations became his friends because "I had inside me something of the passions they felt inside them".

Campbell, whose diaries are published this weekend, likens Blair to a marriage guidance counsellor. In an interview for Saturday's Guardian, the former Downing Street communications director says: "Tony's genius was to be like a Relate counsellor. It was like he was absorbing all this angst and anger and bitterness and hatred and the rest of it. He was somehow able to make both sides feel that he kind of got it - he really did understand it."

In his foreword to Campbell's diaries, published in today's Guardian, Blair explains his approach. He writes: "In a conflict, there is suffering of a nature and on a scale that we, from the outside, can scarcely appreciate, because it is not within our experience. Each side has a sense of pain and of cruel consequence from the other side's actions. They need to know that those mediating get this feeling, not at a rational but at an empathetic level. In getting it, the mediator is then able to pass something of the pain of each side to the other."

The diaries focus mainly on the build-up to - and the aftermath of - the 1998 Good Friday agreement negotiations, which paved the way for the eventual political settlement between Sinn Féin and the DUP, agreed shortly before Blair stood down as prime minister in 2007.

In his foreword Blair says that his empathy with the main participants - Gerry Adams, Martin McGuinness, David Trimble and Ian Paisley - was vital to his success.

Blair writes: "Many of the hundreds of hours I spent in discussion with the parties were not simply about specific blockages or details of the negotiation, but rather about absorbing and trying to comprehend why they felt as they did, and communicating that feeling to the other side. In this way, they became my friends, because I then had inside me something of the passions they felt inside them. In addition, as the process winded its way, the parties got to know each other, and started to look upon each other as human beings with a different perspective, not as enemies mired in evil and incapable of good.

"For those of us who in our youth flirted with the somewhat determinist branch of Marxist-oriented leftwing politics, the Northern Ireland peace process is a classic example of how individual people, in a certain place at a certain moment in time, can make the difference. There is little doubt in my mind that with a different cast of individuals, the outcome may well have been different and adverse."

He pays warm tribute to the former Irish prime minister Bertie Ahern and to the Unionist, nationalist and republican leaders for rising "above the burden of history".

He writes: "We were immensely fortunate to have an Irish leadership - in the form of Bertie Ahern and his key ministers - that was prepared to lay aside the grievances and attitudes of the past in the interests of the future. This is emphatically not to say that they didn't feel those grievances or the pressure to deliver justice for the Irish people. But they rose above the burden of history, consigning it to its proper place - a spur to action, not a chain to anger.

The same was true of the Unionist leadership - at the beginning in the hands of David Trimble - and of course of the SDLP and Sinn Féin. It is easy to forget how simple and superficially alluring wallowing in the feeling of injustice or retribution for past hurt can be. There is a ready audience for it amongst large parts of any party's activist base. The applause lines are familiar and well received. The alternative requires the development of a wholly new narrative, the challenging of old assumptions, the admission from time to time that the other side might have a point. So leaders have to replace a rhetorical formula that involves the statement of grievance and a denouncement of opponents with one that turns that on its head, and starts to speak of the possibility of reconciliation with those with whom the whole of the history up to that point has been about the utter unacceptability of such a reconciliation. This is real political leadership; and it takes real character to do it."