Unforeseen ground conditions have mired many civil engineering projects in contractual rancour and delay. But a campaign by protesters about what was lurking under Ireland's proposed South Eastern motorway - the last stretch of the M50, Dublin's M25 - posed problems which few geological features could have matched for disruption.
Remnants of the ancient Carrickmines Castle were noted in preliminary studies to build a motorway back in 1983, but few would have taken much notice.
Apart from a gable wall, all that remained were foundations and sections of 'fosse' or ditch defences.
The battle by archaeological campaigners to preserve the subterranean ruins when a decision to build the M50 was taken was entirely unforeseen. Two separate hearings, going as far as Ireland's Supreme Court, and a change in Irish law relating to construction affecting national historic monuments were to follow, causing near fatal delays to the contract.
The South Eastern Motorway was already making headlines as Ireland's most expensive road project in 2000. Running through some of the country's wealthiest suburbs, total cost for the 10.1km stretch, including land purchase, has reached E600m ($720). The high cost shows the road's critical importance to Dublin's roads infrastructure, completing the last leg of the C-ring around the capital.
Extensive archaeology has become a feature of the countrywide National Roads Authority (NRA) roads programme.
Following public criticism when one of the world's most valuable Viking sites became part of the foundations of Dublin Corporation's civic offices at Wood Quay in the late 1970s, battalions of archaeologists now work on road building sites, funded by the roads programme itself.
Archaeological work on the motorway began in 1995. But as an August 2002 deadline for completion - which the NRA says was agreed by site archaeologists and the state heritage service Duchas - approached, a vociferous preservation campaign began (see timeline).
The alignment was dictated by built up areas on one side, and the Dublin mountains on the other. 'In deciding the route of the road a large area of land was avoided where the castle was thought to be and where we still think it to be, ' says NRA regional manager Tim Ahern. 'During these excavations, more archaeology than was anticipated was encountered, including a section of a defensive ditch which probably surrounded the castle.'
The castle itself was protected, but archaeological campaigners argued that the road alignment should have avoided the ditch.
Ironic, because the ditch was only discovered because of that same road.
Work was frozen by the courts and the castle ruins and ditch given national historic monument status.
With the castle site midway along the alignment, it looked disastrous for the project.
'We had a very confined linear site with a large no-go area in the middle. It was very difficult to access one area from the other, ' says Ahern. 'There was an earthworks balance over the whole contract site and it was totally inappropriate to have major construction plant travelling on the local road network.'
Contractor Ascon, HBG's Irish subsidiary had won the E130M ($158), 156 week, standard Institution of Engineers of Ireland remeasurement form contract in October 2001. Around a quarter of the road was completed when the project became bogged down in injunctions.
'There was total uncertainty as regards the delay and it was impossible to programme the job. So it got to a stage where we had to consider abandoning the contract and dealing with the consequences of that, ' says Ahern.
For the NRA, aside from the opprobrium of the traffic-weary public and politicians, abandoning the job would have had huge cost implications. It would also suffered a loss of credibility at being unable to complete probably the most important stretch of road in the Republic.
'There would have been arguments as to whether it was abandonment or forfeiture or frustration of the contract, and whether the events were beyond the contemplation of either party.
The sheer cost of closing down and paying off the contractor would have been enormous, ' says Ahern.
'We'd reached a point of meltdown. There were huge risks for both parties. The big risk to the contractor was that they'd get thrown off site, having geared up for the job with resources which would have nowhere to go. The big risk to us was that if it was seen as suspension of the contract then there would be costs of tens of millions of euros. And the job wasn't getting built, ' he adds.
Abandonment would also have meant having to go through all the regulatory and statutory approvals again, delaying the job possibly by around four years.
While the Supreme court and the government worked to resolve the archaeological issues, 'we sat down with the contractor and did a total risk assessment of everything and came up with a supplemental agreement, ' says Ahern.
Drawn up in just a few weeks in April and May 2003, the new agreement was revolutionary for Ireland. 'We went for a New Engineering Contract (NEC) type model for the balance of work remaining to be done, with a revised timescale taking account of the delays beforehand. It is the first time an NEC target price and cost plus contract had been used on a public sector project in Ireland.'
Rather than forming a new contract - perhaps running the risk of falling foul of EU competition and tendering rules - the new agreement included the work already done under the conventional contract as a sum.
Everything else, including issues overhanging from the first agreement, were included in the new NEC agreement, signed for E195 ($238M). At E65M ($79M) more than the original it took account of construction inflation costs over the three years since work had started and factored for risks that would have otherwise been dealt with as claims.
'Our best independent analysis reveals it is not a soft target price, ' Ahern insists. 'The contractor will win bonuses if its final price is lower than the target, but will be penalised if it is higher.'
Finally back on site, morale which had plummeted due to the delays and uncertainty is now buoyant, says resident engineer for consultant RPS MC O'Sullivan and Dun Laoghaire Rathdown Council, Rory O'Sullivan. 'There was a learning curve coming from a traditional adversarial form to a target cost partnering arrangement. New working arrangements had to be forged and it didn't happen overnight, ' he adds.
Value engineering is being employed to the full, to allow design or specification changes where there is a clear advantage to the project.
Work is now proceeding apace, apart from a 150m strip around the castle ruins where archaeologists are continuing their work. The job is hoped to partially open at the end of the year, before completion next August when motorists can finally bypass the city entirely.
But they might encounter some new delays too - even before its last stretch is completed. The government ignored professional advice during planning in the 1980s and opted for a two-lane motorway with basic junctions, but traffic misery at roundabouts such as Red Cow - dubbed the 'Mad Cow' - has been the legacy of this money-saving decision.
The M50 has already been earmarked for upgrading to three lanes with clover-leaf continuous flow junctions.