Ireland rocked England after nightwatchman Jack Leach fell just short of what would have been a remarkable Test hundred as the visitors pressed for a shock victory at Lord's on Thursday.
England were 209 for five in their second innings at tea on the second day, a lead of just 87 runs.
Leach made 92, his highest first-class score, after being sent in as a night watchman on Wednesday.
That was more than the 85 all-out England, with Leach at number 11, managed between them in their first innings as veteran Ireland seamer Tim
Murtagh took 5-13 on his Middlesex home ground on Wednesday. Leach and Test debutant Jason Roy, who made 72, put on 145 for the second wicket.
But from 171-1, England lost four wickets for 23 runs as they slumped to194-5 in what is Ireland's first Test against them and just their third in total.
England resumed on their overnight 0-0 after Ireland had made 207, featuring Andrew Balbirnie's 55.
The one-off fixture was scheduled to last four days, rather than the standard five for a Test.
Wednesday had seen England bowled out in a single session for the fourth time since 2016 -- a worrying sign ahead of an Ashes series that starts next week.
Unexpected opener Leach, who survived a Murtagh maiden on Wednesday, played watchfully straight.
And when fast bowler Boyd Rankin, the first cricketer since the Nawab of Pataudi in 1946 to both play for and against England in a Test match, dropped short, Leach cut him for four.
Left-hander Rory Burns fell for six when he pushed hard at Rankin away from his body and edged a simple catch behind to wicketkeeper Gary Wilson.
Roy, looking to make England's problem position of Test opener his own after starring in their World Cup triumph, off-drove a four off paceman Mark Adair and hoisted off-spinner Andy McBrine for six.
Leach went to 47 with a straight-driven four off Stuart Thompson before his edged boundary through third man off the medium-pacer saw the Somerset left-arm spinner to his fifty.
It was a fine effort by Leach, playing his fifth Test but first on home soil. And when Roy cut Thompson to the point fence, he completed a 47-ball fifty including seven fours and a six.
The bespectacled Leach should have been out for 72 when he edged Rankin, only for Wilson to drop the chance despite getting both hands to the ball.
Roy, however, was bowled for that score by a Thompson in-ducker. Leach had another reprieve on 92 when he edged Murtagh only for Adair, standing exceptionally close at second slip, to drop the chance.
But two balls later a softer, defensive, edge went straight to Adair and this time he made no mistake.
Leach, who had been in sight of an achievement that eluded batting greats Brian Lara, Ricky Ponting and Sachin Tendulkar -- a Test hundred at Lord's -- walked slowly off to a standing ovation after batting for 220 minutes and facing 162 balls, hitting 16 fours.
At 182-3, England were only 60 ahead and they then suffered a self-inflicted wound when Joe Denly was run out after being sent back by Root when the skipper was already two-thirds of the way down the pitch. And when Adair had Jonny Bairstow lbw for a duck, Ireland were back on top.