Gilles Peress has spent four years photographing Northern Ireland. Of course his images tell of bigotry and conflict. But they capture, too, a softening of hard lines, a growing sense - even after the Omagh bombing - that peace, some sort of peace, is finally at hand. Words by The Independent's Ireland correspondent, David McKittrick

n Irish prime minister once generated a storm of political protest by describing Northern Ireland as a failed political entity. How dare he, said Protestants and Unionists; he's right, though, said Catholics and nationalists: the place really is a mess. It is self-evident that the polity has not delivered peace, stability and reconciliation over the past three decades. But it is also apparent that, even after Omagh, it now has a chance of a far better future. Though the Troubles have been terrible, all the signs are that the next 30 years will be a much better era. For all the bitterness and the bigotry, the tribalism and the hatred, there is in the air a sense that a corner has been turned.

This sentiment arises not just from hope and a natural longing for peace, but from a communal intuition that the Troubles have run their course. Most feel in their bones that an honourable compromise was finally reached in the agreement signed in Belfast on Good Friday. The scaffolding of an intricate new constitutional structure is presently being put into place with a new Belfast assembly, new cross-border arrangements, impending prisoner releases and reviews of policing and emergency legislation. It is all very complicated, but the nuts and bolts represent a whole new political architecture designed to ensure that in the next century differences will be thrashed out through argument and debate rather than at the point of a gun.

The assemblage of all these details was made possible by that sense in the air that the time had come to give peace a chance. Four years ago I entitled a book Endgame, intending to convey the idea that in many minds the Troubles were at long last entering their final phase. That sense was vital to the progress which has since been made; it provided a plausible alternative to the long-standing assumption that the Troubles represented a problem without a solution. This was a highly damaging theory in that it fostered cynicism and fatalism and discouraged hope. The new theory has not completely displaced the old one but it is prevailing, with just over 70 per cent voting Yes in the referendum endorsing the Good Friday accord. The same percentage voted for pro-agreement parties in the assembly elections in June. These figures also show, however, that there is still sizeable opposition to the accord. The events of the summer, centring on the Drumcree Orange marching confrontation in Portadown, show that whether or not Northern Ireland is a failed political entity it is not a fully stable one and is susceptible to periods of great turmoil. The bomb that killed 28 people in Omagh illustrated this in the most tragic way.

For these reasons nobody can afford to relax, since there are obviously no guarantees that the fledgling settlement can withstand the political attacks of its opponents and the periodic buffeting from future bombings and marching controversies. The Orange urge to march is one of the deepest instincts within the Unionist psyche. Many who take part in the almost 3,000 marches annually do so primarily for political and cultural reasons. Some feel they are asserting their superiority over the Catholic and nationalist community; some have more specific political purposes, as did those who tried to use this year's Drumcree march to undermine the Good Friday accord.

But for many of the younger element the politics are secondary to social purposes, to adolescent display and to sex. The upright Christian gentlemen intoning prayers at the front of parades would hotly deny it, but for many of the young these are courting rituals. One Protestant woman told a teenage girl: "You want to score? Get yourself down to Drumcree, love, there's hundreds of likely lads down there every night. You're bound to score, bound to." Certainly lots of girls follow the bands, and many relationships have developed from apres-march cuddles.

Years ago the academic Desmond Bell captured all this in a succinct description. "At the head of loyalist parades stride the starched and joyless Bible- carrying mullahs while in the rear the dancing, six-pack-bearing younger generation of denim and studded leather reflect a fundamental antinomy between puritanism and hedonism, authority and licence."

This year's Drumcree march led to much lawlessness, culminating in the petrol-bombing attack which claimed the lives of the three young Quinn brothers. There is a good chance that tragedy will have a chastening and inhibiting effect on those who pitched young Protestants into confrontation with the security forces. If so, the hope is that the Orange marches will gradually become less confrontational, more concerned with the social aspects. It would be helpful, in other words, to have less violence and more sex.

The urban Protestant working-class young will, however, continue to be vulnerable to the scourge of paramilitarism. Loyalist paramilitary groups have been in existence for more than a quarter of a century, surviving generational change. Many of their recruits are nasty, brutish and short, membership of these illegal groups providing their only source of status in the backstreets. Since they also confer on the heavily tattooed a primitive sense of fellowship, they are likely to survive for many years.

But whatever happens inside Orangeism and the Protestant paramilitary groups, within Unionism there is going to be plenty of politics. The referendum and the election showed that David Trimble, leader of the Ulster Unionists and principal Unionist advocate of the agreement, speaks for a majority of Unionists. But his majority is a small one, with just over half of Unionist voters in his camp. Ranged against him are some in his own party, including a majority of its MPs, together with most of the Orange Order's leadership.

Then there is the Rev Ian Paisley. He did not win the recent votes, but nor did his support collapse and he remains a formidable enemy who will work within the assembly to dish the deal. Now in his seventies, he cannot go on for ever, but the strong strain of anti-Catholic fundamentalism will outlast him.

Yet although David Trimble has dangerous opponents, he also now has new allies. The assembly will be run by an executive at the heart of which will be a partnership between Trimble's party and John Hume's Social Democratic and Labour party. The two top posts are to be filled by Trimble and John Hume's deputy, Seamus Mallon. They have already begun to demonstrate, during the Drumcree and Omagh crises, that Unionist and nationalist can work together. And these two central parties will of course have the fullest support of Tony Blair and Mo Mowlam, who have shown a touch as sure as the previous Tory government's was maladroit.

Among republicans, meanwhile, enthusiasm for the political processes rather than terrorism has been extraordinary. Supporters of the IRA and Sinn Fein - a decade ago quite prepared to back the "armed struggle" - voted overwhelmingly in favour of the Good Friday accord. This is largely because they, together with John Hume and others, have changed the parameters of those political processes. Ulster is no longer viewed as a domestic British problem but has instead become internationalised, with Dublin and Washington established as major players.

All this has given political clout to a republican community which used to believe that the only way to influence events was through the bomb and the bullet. Now it has an alternative source of empowerment and one which is set to grow when, later this year, Sinn Fein leaders Gerry Adams and Martin McGuinness take their seats in the new executive.

But the IRA, like the loyalist groups, is not going to disappear overnight. The roots of paramilitarism go so deep that underground organisations may become permanent fixtures. Republican politics may be moving towards the mainstream but demonstrations, street activity and general agitprop have been a feature of republican activity for decades and will continue to be so. And, as on the loyalist side, there are thousands of nationalist youths who have in their time thrown bricks and petrol-bombs at the police and the army. At future points of high tension - and there are bound to be some - they will no doubt be seen again on the streets of the Falls Road and the Bogside.

In any other part of these islands the future outlined above - clashes over marches, bitter political infighting, continuing paramilitarism, the possibility of more bombs - would be a source of horror and dismay. But in Belfast many would settle for such a future if it prevented a return to the really bad old days. The republican and loyalist cease-fires are plainly flawed, but they are demonstrably of value. People still die violently but even with Omagh the killing rate has dropped dramatically. It is by no means a perfect peace but it is a huge advance on the darkest days of the Troubles.

The Troubles took more than three-and-a-half thousand lives and inflicted physical and mental scars on tens of thousands more. In many cases the hurt of injury and bereavement will never heal. But it is still possible to appreciate an imperfect peace, to marvel at the resilience of people who have gone through so much, and to celebrate the exuberance of those young people who, with luck, will have much better lives than their parents. They will grow up in a badly damaged and divided society facing a great many problems. They will continue to witness confrontations and conflict. But the hope is that they will see their leaders resolving issues though force of argument rather than the argument of force.

As those leaders gradually become versed in the practice of give and take, rather than stand-off and impasse, then some day the conclusion may be that, its past notwithstanding, Northern Ireland has become a working political entity. Its young deserve no less

Clockwise from top left: a Catholic stand-off with British troops during a loyalist march at Portadown in 1997; Superduck and a dinosaur on the street during a fair this year at Ballymoney; an Orange march to a church service in the nationalist town of Dunloy, 1998; at the fair in Ballymoney; Catholic girls, ready for the future

Previous page: young Protestants at a loyalist rally in Belfast last year

This page, from top: Martin McGuinness of Sinn Fein (third from left) joins in a symbolic removal of British Army obstacles sealing off the border between Northern Ireland and the Irish Republic after the IRA announced a cease-fire in 1994; David Trimble, Tony Blair and John Hume face the press in Belfast this year; pallbearers at a Belfast funeral for a pregnant mother and her daughter, victims of the Omagh bomb last month. Right, from top: Catholic children on the streets of the Ardoyne,

Belfast, in 1994 after the province's worst night of violence in 25 years; the Apprentice Boys' march at Londonderry in 1996