Simon Church saved Wales from a miserable Euro 2016 send-off in front of their own fans as Michael O’Neill was denied his his first friendly win as Northern Ireland manager.
Northern Ireland had appeared to be on their way to a first victory over Wales since 1980 when Craig Cathcart fired the visitors ahead on a wet and windy night at the Cardiff City Stadium.
But Church, who had only been on the pitch 13 minutes, won a last-minute penalty when he was tripped by Gareth McAuley and he converted emphatically from the spot to secure a 1-1 draw.
Wales manager Chris Coleman had promised a feisty British derby but crunching tackles and chances were at a premium until Cathcart pounced on the hour mark.
The hosts were caught napping by a short corner routine with Paddy McNair allowed to cross into the penalty area.
Wales failed to clear the danger and Cathcart reacted quickest to the loose ball by driving through a crowded box for his second international goal.
For Northern Ireland, the goal looked like providing useful momentum towards Euro 2016, although they will take comfort from the fact that they have matched the record nine-game unbeaten run enjoyed by Billy Bingham’s side 30 years ago.
Wales, by contrast, will take little from the contest apart from the worrying knowledge that they simple do not carry the same menace without their talisman Gareth Bale.
Bale was absent after being plagued by calf problems and, with Aaron Ramsey and Hal Robson-Kanu also missing through injury, Wales’ attacks often petered out against resilient visiting defenders.
Wales applied some early pressure with George Williams and Chris Gunter putting in dangerous crosses from the right, but Northern Ireland slowly settled and began to stop the hosts from building through midfield.
The only on-target attempt of a tame first half arrived after 20 minutes when McAuley was beaten by Tom Lawrence’s trickery for David Cotterill to take aim from a free-kick.
Cotterill’s effort flew past the white-shirted wall, but Michael McGovern got down quickly to divert the ball to safety.
McGovern waved away over Cotterill’s shot from the resulting corner and the excitement levels did not really stir until the final 10 minutes of the first half.
Wayne Hennessey caused a few Welsh hearts to flutter when gathering Conor McLaughlin’s cross at the second attempt, but it was the visitors who were forced back on the defensive.
Williams switched wings to cut on to his right foot and send a shot goalwards which was helped over the crossbar by the head of Cathcart.
Sam Vokes and James Chester then headed wide from Cotterill corners in quick succession, with Northern Ireland briefly breaking out for the debut-making Conor Washington to send a rising drive over the bar.
Danny Ward replaced Hennessey to win his first cap at half-time and the Liverpool understudy was soon needed to push out Kyle Lafferty’s effort after Adam Matthews’ last-gasp tackle on Steven Davis.
But Ward was left helpless 10 minutes later when Cathcart found space in a crowded area to finish more like a centre-forward than a centre-half.
Wales huffed and puffed after that and, with both sides making increasing substitutions, it looked as if their chance had gone.
But a confident Church stepped forward with time running out to prevent a second successive loss following their November friendly defeat to Holland.