The search for a new beginning in Northern Ireland has been haunted by history.
ALL OF the participants in the Northern Ireland peace process went to the Stormont talks with the hope of finding a new Ireland, a new agreement for the new millennium. But behind every table stood a ghost; along with a commitment to peace they were haunted by the legacy of centuries of religious strife.

Take the Irish Taoiseach, Bertie Ahern. He left the talks for a time on Wednesday to bury his 87-year-old mother, Julia. Born in 1911, she often told the family about growing up in west Cork during the south's troubled passage towards independence. Bertie's father was a member of the 3rd Cork brigade of the IRA. In later life Mrs Ahern would tell tales of how the Black and Tans shot all the turkeys on the family farm and how, during the civil war, Free State forces would come to their home and "turn it upside down" because it was regarded as a republican household.

Bertie Ahern has always been a constitutional nationalist, vehemently denying that the IRA of today are the legitimate heirs of the republican forces of the 1920s. Nonetheless folk-memories and family recollections have played an important part in moulding even his generation of southern politicians.

This week he found himself negotiating with northerners whose lives have been more deeply and more recently touched by violence. The purpose of the enterprise was to find a new political dispensation to supersede the imperfect arrangements of the 1920s.

There has never been such a wide-ranging negotiation involving so many points of the political compass, and rarely has such a sense of a historic new beginning been generated.

Mr Ahern found himself coming to grips politically with, for example, Jeffrey Donaldson, one of the Ulster Unionist party's chief negotiators. Mr Donaldson still remembers learning in 1970, when he was seven, that a cousin had been killed by the IRA. An RUC constable, he was one of the first policemen killed in the Troubles.

Also in the talks was Gerry Adams, who is used to accusations that he has been a supporter of violence. But his family too has suffered: a nephew was savagely killed by extreme Protestants in the mid-1970s, while his niece's husband died, also at the hands of loyalists, in January of this year. Others in the Sinn Fein delegation, perhaps even a majority of them, have been to jail.

Across the table from them were delegations associated with loyalist paramilitary groups. These also contained people who have lost loved ones, and who have taken life: four of the loyalists there yesterday have killed at least six people, and spent time behind bars as a consequence.

In one sense it was time well spent, for most of them emerged from the Maze prison changed people, disenchanted with violence and hungry for politics. One of them killed two men and threatened my life, actions which, in the 1970s, were the stuff of paramilitary politics: today he has a deep and genuine longing to have done with war.

It is the sight of conversions such as these, in which hard men learn the hard way about the facts of civilised political life, that give most hope for the future.

How did we get to this point? The purely political parties, excluding Sinn Fein and the loyalists, had been talking together on and off since 1991, when Peter Brooke as Northern Ireland Secretary first brought them together. Those early efforts seemed to come to nothing, although it can now be seen that valuable groundwork was laid for later advances.

It was John Hume, leader of one of the few parties which has never been overtly or covertly involved with violence, who years ago set out the conceptual framework for the talks. He maintained that they should deal with three key sets of relationships: those between Unionists and nationalists in Northern Ireland; those between north and south; and the east-west relationship between Britain and the island of Ireland. Its strength was that it was an agenda designed to cope with the facts of history and geography.

John Major and Sir Patrick Mayhew brought the parties together again in mid-1996, but they became bogged down in procedural trench warfare and made little headway.

Then came Sinn Fein. After the July 1997 renewal of the IRA ceasefire, Tony Blair moved swiftly to bring the republicans into the talks, and to set a deadline for their completion. Rev Ian Paisley, who walked out as the republicans walked in, will now oppose the agreement, as he has opposed all past deals.

But crucially David Trimble stayed, though at no point have his party members negotiated with or even spoken to Sinn Fein members. The talks moved slowly, and not as the Government would have wished, but despite difficult moments they did not fall apart.

Until this week they tended to take the form of speechifying rather than productive negotiation, with parties almost endlessly rehearsing their cherished beliefs rather than suggesting compromises. It is a fair bet that without the Government's insistence on a deadline, they would have continued to rehearse them for many more months.

A particularly bad period came at the turn of the year, with some important republican figures breaking away from the IRA and four of David Trimble's 10 Westminster MPs pressing him to quit the negotiations.

Deeper trouble followed when the assassination of loyalist leader Billy Wright by republicans brought a wave of loyalist violence which included the shooting of Gerry Adams's relative. At that point, attention focussed on the Maze jail, where Mo Mowlam went to calm loyalist prisoners, rather than in the talks: worryingly, politics seemed for a moment to have lost their primacy.

But the talks resumed on schedule, though the progress of negotiations was halted by disputes which led the temporary expulsions first of one of the loyalist parties and then of Sinn Fein. The two governments also produced a paper which was sharply rejected by both Sinn Fein and the IRA: a later draft was however more favourably received by republicans and nationalists, and the talks stayed on track. A particular outcry was caused when a loyalist attack on a bar in the previously peaceful Co Armagh town of Poyntzpass killed two men, Philip Allen and Damien Trainor. A Catholic and a Protestant, they were lifelong friends whose relationship transcended political dispute. The poignancy of their deaths generated momentary despair, yet it did not deflect the course of the talks.

By this time, the outline of an eventual settlement had become clear. A new devolved assembly would be set up in Belfast, while a north-south council would link the two parts of Ireland. A new concept, that of a British-Irish council, would connect devolved institutions in Belfast, Edinburgh and Cardiff.

The new deal would include measures to protect civil and political rights, promote equality, and go on to consider the issues of policing, prisoners, the justice system and arms de-commissioning. In total, this amounted to a new political geography of these islands which would address Hume's three-cornered concept.

But while the outline was clear enough, its vital details - as the events of this week showed - remained stubbornly unresolved. Arguments continued over arrangements for the assembly and its relationship with the north- south council. Unionists advocated a modest assembly and an even more modest north-south body: the assembly, in their view, should have no legislative powers and no cabinet to run it, while the north-south institution should be merely consultative.

Over the months, Sinn Fein delegates played their cards close to their chest, favouring a strong north-south body but refusing to admit publicly that an assembly should be part of any deal. This seemed illogical in that any cross-border institution would have to be anchored in a Belfast assembly, but it made sense politically in that it meant the republicans gave no hostages to fortune and made no concessions.

The SDLP and Irish government pursued agreement much more actively. They advocated a strong assembly with legislative as well as administrative powers, to be run by a new cabinet-style administration including both Unionists and nationalists. They argued for a powerful north-south body with wide powers and enough independence to thwart any moves by a Unionist- dominated assembly to neuter it.

Behind the arguments lay two very different philosophies. A strong consensus had developed within Irish nationalism that any settlement which excluded Sinn Fein would, in the words of a former Irish government adviser, not be worth a penny candle.

On the Unionist side, however, a number of the negotiators readily contemplated cooperation with constitutional nationalists such as the SDLP, but baulked at the idea of ever working with Sinn Fein. A few months ago, Unionist negotiator Ken Maginnis, for example, described Sinn Fein as "unreconstructed terrorists," declaring: "I could never give cognisance to them, not as long as I live."

The useful thing was that all the parties became familiar with the details of each other's positions. The problem was that the talks remained stuck on the point of each party's preferred options, with no one sure how far others were prepared to move.

The talks building itself has been no help to negotiation. A modified civil service office block within the sprawling Stormont estate in east Belfast, it is characterless, cheerless and boxy. Delegates complained that its stark Sixties design offered no intimate hidey-holes for private politicking. In the canteen, most politicians tended not to mix, while the bar was found unappealing. Comparing it to an RUC interrogation centre, Gerry Adams called it "Castlereagh with coffee".

But not all the business was done at Stormont, with both Tony Blair and Bertie Ahern receiving a flow of visitors to London and Dublin. Adams went to Downing St several times, but a much more frequent visitor was David Trimble. The Prime Minister knew that no deal could be arrived at without the approval of the Unionist leader, and set out to win his trust. He appears to have succeeded in this - which was no mean feat, since Mr Trimble's precise thought processes all along remained a mystery even to some of his closest associates in his own party.

One of the few moments of levity came earlier this month when Mo Mowlam announced that so much progress had been made that the deadline had been advanced. This turned out to be an April fool's jape; in fact the story of this month has been one of hold-ups and apparent setbacks. The talks chairman, George Mitchell, was to produce his working paper on Friday of last week, but it was not until the early hours of Tuesday that it emerged from his office, the delay signifying much behind-the-scenes disagreement.

Once it arrived, however, the paper served its purpose of confirming the shape of yesterday's agreement while leaving key details open to last- minute renegotiation. By this stage, Sinn Fein had become the dog that didn't bark: republicans seemed to accept a clearly partitionist document with something approaching approval, with the noisy objections coming instead from the Trimble Unionists.

Yet even as the Unionists complained, it seemed they were coming to terms with the new political contours laid out in the Mitchell document. The demand was for changes to the document, not the scrapping of it, and it served as the basis of the final burst of negotiation.

In the final days Tony Blair and Bertie Ahern arrived, bringing with them the political muscle to dislodge the parties from their treasured positions. They have been days and nights of hard pounding, but they have ended in success. The spectre of all that unresolved history lay heavily on everyone, but in the end it proved not strong enough to overcome the spirit of peace and the desire to put an end to war.