Wales made the last eight of Euro 2016 as an own goal from Northern Ireland's Gareth McAuley settled a tense game in Paris.
On one of Europe's grandest football stages at the Parc des Princes, the two sides produced a game that would not have won any beauty contests. It was competitive and wholehearted, but entertainment and chances were at a premium with so much at stake.
So perhaps the goal which decided matters -- and sends Wales through to a quarter-final against either Hungary or Belgium in Lille on Friday -- was appropriate as Gareth Bale eventually left his mark on proceedings.
It came as Northern Ireland, who had fought and harried for their lives, were within 15 minutes of taking the game to extra time, but punished for switching off for a split second.
In that time Aaron Ramsey found Bale in space he had craved all day, and he made the most of it with a perfect ball into the box between McAuley and goalkeeper Michael McGovern.
McAuley had to intervene with the substitute Hal Robson-Kanu lurking behind, but his touch from a few yards out was a fatal one for Northern Ireland.
Wales might have come into the game as favourites after winning their group and having the tournament's joint top scorer in Bale, while Northern Ireland qualified for the last 16 as one of the four best third-placed teams.
But Northern Ireland can boast a FIFA world ranking of 25, one lower than Wales, and their run of only two defeats in 15 games -- albeit to Germany and Poland at this tournament -- demanded respect.
The two nations met for the first time in 1921 following the partition of Ireland, but none of their previous 60 games had carried the importance of this Paris fixture.
Wales were seeking to emulate the achievements of the 1958 team who reached the quarter-finals of the World Cup in Sweden - the last time they had played at a major tournament.
And Northern Ireland had history on their side as it was 34 years to the day since they beat hosts Spain at the 1982 World Cup, one of the greatest results in their history.
Manager Michael O'Neill recalled Kyle Lafferty after the striker who had scored seven goals in nine qualifiers had been omitted from the final two group games.
Lafferty was prominent in the early stages as Northern Ireland defended diligently and looked to spring when the opportunity arose.
The ploy almost paid off in the 10th minute when Jamie Ward scampered down the right and Corry Evans worked the ball to Stuart Dallas who forced a fine save from Wayne Hennessey.
Northern Ireland crowded Bale every time he had the ball, yet the Real Madrid forward still found space to deliver a cross which Ramsey poked at harmlessly.
With Bale shackled - incredibly Wales goalkeeper Wayne Hennessey completed more first-half passes than he did - Ramsey looked their most dangerous attacking option with his runs from deep.
Ramsey had the ball in the net after 19 minutes when Sam Vokes climbed above Jonny Evans and headed down Neil Taylor's cross but the offside flag was correctly raised.
It was a rare moment of promise for a Wales attack which had finished the group stages as joint top scorers with six goals but were being frustrated at every turn by organised opponents.
And Wales had another warning when Ward chanced his arm from 20 yards to produce a fingertip save from Hennessey.
It was cagey and full of mistakes and probably the game Northern Ireland wanted and Wales feared with little flow and rhythm to the game.
But Wales should have been ahead eight minutes after the restart when Ramsey picked out Vokes with a diagonal pass which the striker headed carelessly wide.
It was Vokes' last involvement as Robson-Kanu was sent to add extra mobility and McGovern was soon tested for the first time as he kept out Bale's powerful 25-yard free-kick.
Jonathan Williams' introduction also gave Wales an extra attacking edge as manager Chris Coleman attempted to release the grip that Northern Ireland had on the contest, even if they were creating little themselves.
A few crosses were swung over but they were often hit beyond the waiting Lafferty.
The changes were working, Ramsey was probing, Bale eventually found space and McAuley's touch proved the difference.