Kevin O'Brien scored Ireland's first Test century to bolster hopes of at least avoiding defeat in their debut in the five-day game against Pakistan.
Ireland resumed day four on 64-0 in their second innings having been forced to follow-on by the visitors, who reduced the hosts to 157-6 to seemingly put them in position for an emphatic victory.
Mohammad Amir, having been troubled by a knee injury on day three, looked back to fitness and form on Monday and did much of the damage with figures of 3-57.
But Amir and the rest of the Pakistan attack were frustrated by the brilliance of O'Brien, who forged a pivotal partnership of 114 with Stuart Thompson (53) and an unbroken one of 48 with Tyrone Kane (8), staying unbeaten on 118 to guide Ireland to 319-7 at the close on an historic day at Malahide.
Ireland therefore lead by 139 going into the final day, with a draw and even a victory still within their grasp after being applauded off the field by Pakistan at stumps following O'Brien's magnificent effort.
Opener Ed Joyce (43) was run out by Faheem Ashraf before Andy Balbirnie went for a duck five balls later as Ireland made a dreadful start to the day.
The prospect of defeat loomed ever larger after Amir dismissed any doubts over his ability to produce pace by sending Niall O'Brien's (18) off and middle stumps careering out of the ground, before then claiming the scalp of captain William Porterfield (32).
O'Brien's arrival at the crease prompted the first signs of Ireland resistance but wickets continued to tumble around him until Thompson joined him in the middle.
Their defiance ensured Ireland would not only avoid an innings defeat but also give their own attack something to bowl at in Pakistan's second innings.
And, though a ripper from Shadab Khan removed Thompson, O'Brien proved immovable, his belligerent strokes keeping the scoreboard ticking before he wrote his name in the history books by sneaking two through point to bring up his hundred.
O'Brien and Kane withstood pressure from Amir, Rahat Ali and Mohammad Abbas late in the day, and Ireland go into the last three sessions with the unexpected dilemma of deciding how long to bat before attempting to bowl Pakistan out to seal a seismic shock win.
20 de mayo 2018
|Walker out with eye socket fracture following Melbourne-Manly brawl|
|Don´t try it at home! - LeBron wows with game three passing|
|Dragons restore two-point lead, Sharks battle past Bulldogs|
|Any club would want Buffon, says PSG president|
|Villarreal renew Calleja contract after Europa League qualification|
|Talisca heading to Premier League, hints Besiktas boss|
|Celtics ´needed to get our butts whooped´ by Cavs, says Rozier|
|Bayern should have had a penalty, admits Boateng|
|NBA great Bill Russell released from hospital|
|When I play I´m Luca, not Zidane – Zinedine´s son distances himself from father|
|Barzagli: Buffon the greatest of all time|
|Indians ace Kluber becomes first in AL to seven wins|
|MLS Review: Two-goal Villa inspires NYC rout, Timbers stay hot|
|Kuznetsov sets Capitals´ playoff points record|
|Stevenson-Jack showdown ends in majority draw|
|Galatasaray win 21st Turkish title on final day|
|Cavaliers rout Celtics to cut series deficit to 2-1|
|Harvick holds off Suarez to win All-Star race and $1m|
|All Blacks name three new faces for France Tests|
|Mo Salah 15 years behind Cristiano Ronaldo – Klopp|
|Jaguares extend winning streak with Bulls thrashing|
|Nobody is bigger than PSG, says Al-Khelaifi amid doubts over Neymar|
|Warrington targets Frampton after Selby upset|
|Zidane says Real Madrid are ready for Champions League final|
|Heynckes: Bayern aren´t bad losers after DFB-Pokal snub|
|Everything was positive - Emery leaves PSG satisfied|
|Wise, Leishman tied for Byron Nelson lead|
|Torres, Iniesta share gift of good decisions - Simeone|
|Arrivederci Buffon - The Juventus´ greats remarkable career in numbers|
|Favre leaves Nice as Dortmund post awaits|
|´Extraordinary´ Juventus deserved Serie A title - Allegri|
|Warrington upsets bloodied Selby to secure world title|
|Sweden batter USA, Swiss roll on to gold medal match|
|Zverev battles past Cilic to extend winning streak|
|It was a penalty - Kovac acknowledges Frankfurt´s good fortune ahead of Bayern move|
|Ligue 1: Depay fires Lyon into Champions League as Troyes go down|
19 de mayo 2018
|Tigers tear Rhinos to shreds as Saints stay clear at the summit|
|Mourinho criticises Chelsea long-ball tactics in FA Cup final|
|Caen 0 Paris Saint-Germain 0: Stalemate closes Emery tenure as Caen survive|
|Villarreal 2 Real Madrid 2: Luca´s debut misjudgement costs Los Blancos|
|Conte reaffirms Chelsea commitment and hints at Italy offer|
|Leicester agree €20m deal for Porto´s Pereira|
|Bayern Munich 1 Eintracht Frankfurt 3: Controversial Kovac win denies new club double delight|
|I am a serial winner, Conte declares after Chelsea´s FA Cup glory|
|Courtois delighted to dispel doubts with FA Cup triumph|
|FA Cup win was to save Chelsea season - Cahill|
|Brilliant Hazard ensures Conte´s serial-winner status remains intact|
|Knight Riders cruise into the IPL play-offs|
|Mourinho: I can imagine what people would say if my team played like Chelsea|
|Mourinho: Lukaku chose not to start FA Cup final|
|Hazard shies away from future talk after Chelsea´s FA Cup success|
|Today is your moment - Juventus legend Del Piero pays tribute to Buffon|
|Chelsea 1 Manchester United 0: Hazard seals FA Cup glory in possible Conte farewell|
|Pellegrini leaves Hebei China Fortune amid West Ham links|
|Arnold sees red as Lions overpower Brumbies|
|Toulouse out as Castres advance to Top 14 semi-finals|
|Ruthless Chiefs dominate Falcons to reach Twickenham again|
|Host Pieters crashes out in Belgian Knockout|
|Quarterback Manziel heading to the CFL|
|Valverde content with domestic double in debut Barca season|
|Froome and Yates pull off British Giro one-two|
|Leinster hold nerve to fend off Munster|
|Mancini hands Balotelli Italy recall|
|Valverde sees no way of replacing Iniesta|
|Celtic complete historic double treble by seeing off Motherwell|
|No regrets for Payet after injury ends World Cup dream|
|Pjanic honoured to have played with Juventus great Buffon|
|Nadal grinds out Djokovic win to set up Rome final and shot at number one|
|Lukaku on bench for FA Cup final, Chelsea pick Giroud|
|Gopal puts Bangalore in a spin as Rajasthan Royals stay alive|