Mr David Trimble is likely to be elected First Minister when the new Northern Assembly meets next week, even though his Ulster Unionist Party was outpolled by the SDLP, which won fractionally more first-preference votes.
As the counting continued early today, Mr Trimble's party was expected to emerge as the largest in the Assembly. However, for the first time in Northern politics, a nationalist party polled more first-preference votes overall than any of its unionist counterparts: the SDLP secured 22 per cent of first preferences, compared with 21.3 per cent for the UUP.
The SDLP leader, Mr John Hume, is expected to be Deputy First Minister in the Assembly, which will probably hold its first meeting on Wednesday. Sinn Fein secured its highest electoral support by gaining 17.6 per cent of first-preference votes.
While counting was not expected to conclude until later today, the UUP was forecast to achieve a final total of 29 seats, with the SDLP at 25. Forecast totals for other parties were: DUP 21, Sinn Fein 17, Alliance six, UK Unionists five, Progressive Unionists two, Others three.
Ten other ministers are likely to be appointed in addition to Mr Hume and Mr Trimble, based on the strengths of the various parties. Using the above forecast, these would be divided as follows: UUP three; SDLP three; DUP two; Sinn Fein two.
There are also likely to be junior ministerial posts. The so-called shadow executive - the transitional arrangement until powers are transferred to the Assembly next year - will probably not meet until the early autumn.
The fact that the UUP is likely to be the largest party, despite its relatively poor electoral showing, was described as "a miracle" by senior sources in the party last night. The system of proportional representation and the fact that the constituencies were six-seaters seem to have benefited the UUP.
The anti-agreement forces on the unionist side were divided among the DUP, UK Unionists and Independent unionists.
The Westminster MP for West Tyrone, Mr William Thompson, said last night he would quit the UUP if it started "to share power with Sinn Fein" and participated in cross-Border bodies.
Speaking at the election count in Banbridge, Co Down, Mr Trimble acknowledged there were divisions in his party. "Clearly those problems have had an effect on this election."
He continued: "It hasn't been as great a success as we would have wanted, but it is enough to enable us to move forward and progress. It's just we have to continue to drag behind us this dead weight of people who have difficulty moving into the future."
However, the DUP leader, the Rev Ian Paisley, was confident the anti-agreement side could set the agenda. "Our party, the UK Unionist Party and other unionists will be joining together to destroy the pan-nationalist front."
The SDLP leader, Mr John Hume, warned the anti-agreement parties would be seen as "fascists" if they tried to destroy the process.
"If they are, they are demonstrating that total fascism would be working in Northern Ireland, because 72 per cent of the people of Northern Ireland voted for this agreement. The whole world will see them as fascists if they try to wreck this agreement," he said.
The divisions within the UUP were clearly evident in a bitter exchange on television between the party's director of elections, Mr Ken Maginnis, and the dissident MP, Mr Jeffrey Donaldson.
Mr Donaldson said Mr Maginnis "should hang his head in shame. He has presided over one of the biggest electoral disasters for the Ulster Unionist Party in recent years." He said Mr Maginnis should not be pointing the finger at anybody. "People deserted the Ulster Unionists in their droves, and if you want to unite a party, you have to give both sides of the argument their place. A majority of the party voted for the agreement, but time will prove them wrong."
Mr Maginnis accused Mr Donaldson of "gloating over the difficulties that he and others like him have created in the party and I am saddened, rather than angry, by what has happened."
The Sinn Fein president, Mr Gerry Adams, who was elected to the Assembly from the West Belfast constituency, maintained his party had made the biggest net gain of all, to 17.6 per cent.
A late result last night gave a seat to the Northern Ireland Women's Coalition, whose main spokeswoman, Ms Monica McWilliams, was elected on the 10th and final count in South Belfast.
"For many, many years in Northern Ireland, woman have been the watchers and the waiters. Women are accustomed to keeping a vigil but today the sun has come up for us," she said.