Pakistan resisted an Irish fightback to win the one-off Test Match against Ireland by five wickets at Malahide.
Day five report
Ireland began the final day with a lead of 139 and three wickets in hand but suffered a hammer blow to their chances when centurion Kevin O'Brien was dismissed without adding to his overnight score.
A wild flash at his first ball of the morning saw him safely pouched at first slip and Mohammad Abbas would go on to claim five wickets in the innings when bowling Boyd Rankin and Tyrone Kane.
With only 160 required for victory, Pakistan endured a few early jitters when Tim Murtagh dismissed Azhar Ali in his first over and Asad Shafiq in his third.
In between that, Rankin had Harris Sohail well caught by Ed Joyce in the gully and at lunch, the visitors were 52/3.
Murtagh continued after the resumption but any chance Ireland had of pulling off a shock win was gone when Babar Azam was dropped at third slip having pushed hard at an outswinger from the Middlesex man.
It was relatively plain sailing for Pakistan thereafter, Azam (59) and debutant Imam-ul-Haq (74*) both registering half-centuries before Stuart Thomson picked up two wickets late on.
Day four report
Kevin O'Brien produced another memorable international century to leave Ireland's inaugural Test with Pakistan fascinatingly poised following the hosts' spirited fourth-day fightback.
Seven years after O'Brien smashed the quickest World Cup ton in a match-winning innings against England, he went into three figures again, making 118 not out as Ireland, who had been made to follow-on, progressed to 319 for seven, a 139-run lead.
With showers possible on Tuesday, not to mention scoreboard pressure, all results still appear possible when it had seemed like a Pakistan victory was a foregone conclusion at the start of Monday's play.
Irish optimism was in short supply after being dismissed for 130 first time around, but Ed Joyce and William Porterfield had restored some pride in seeing them through to stumps on Sunday.
Resuming on 64 without loss, still 116 in arrears, the sight of Mohammad Amir moving gingerly due to a "chronic knee problem" flaring up would have provided further encouragement, particularly when he did not open the bowling.
As it was, he was not needed at first. Joyce, with 43, was run out by Faheem Ashraf's direct hit and there was a pair for Andrew Balbirnie, who was once more trapped in front by Mohammad Abbas.
Niall O'Brien and Porterfield could both have been run out but did not make the most of their second lives as Amir produced a brilliant spell.
Two of O'Brien's stumps were uprooted, and leg nearly came out too, before Amir finally found Porterfield's outside edge after several near misses, with Sarfraz Ahmed taking a smart catch to send back Ireland's captain for 32.
Mercifully for Ireland, Amir was eventually taken out of the attack and though Abbas picked up his fifth lbw dismissal of the contest to remove Paul Stirling, the deficit was dwindling.
Overly-cautious field placements and Amir's sporadic use were helping, and it was no surprise that it took the return of Pakistan's chief threat to dismiss Gary Wilson, fishing outside off, to give Amir his 100th Test wicket.
Stuart Thompson just about survived becoming victim number 101 but he, along with Kevin O'Brien, took 14 off two Amir overs to bring Ireland within touching distance of moving in front.
They did so via Kevin O'Brien's edge through the vacant second-slip region for four and the 34-year-old soon became Ireland's first male Test half-centurion.
O'Brien and Thompson not only negotiated the new-ball spell but profited in it before tea - by which point Ireland's lead was 32 - and their continued presence began to deflate Pakistan.
Milestones continued to be reached - first a collective 250, then Thompson's half-century and the three-figure partnership, which were both brought up by with a controlled pull to the fence.
When the alliance did end, on 114, it was only after Shadab Khan found extra turn to bowl Thompson for 53 and provide a much-needed breakthrough for the tourists.
Kevin O'Brien remained, though, and was closing in on a ton, which many in Malahide thought he had brought up with a boundary deemed as leg byes.
The tension was cranked up further when he was on 99 as Sarfraz turned to Amir, yet Kevin O'Brien would not be denied as he reached the century with a clip through point from his 186th ball.
Both he and Tyrone Kane enjoyed the luck of the Irish at the end, with the former nearly playing on to Abbas in the final over, but the pair carried their bats to conclude a remarkable day for the home team.
Day three report
Ireland are fighting to save the game in their inaugural Test match after being made to follow on against Pakistan at Malahide.
After Pakistan declared on 310-9, Ireland were in huge trouble as they slipped to 7-4 early in the afternoon session, Mohammad Abbas (4-44) and Mohammad Amir (2-9) wreaking havoc with the new ball.
Kevin O'Brien hit 40 and an unbeaten 33 from Gary Wilson, playing with an elbow injury sustained in the warm-up, took them up to 130 before the final wicket fell with Ireland trailing by 180.
Pakistan enforced the follow on for the time since 2002 in a Test match but Ireland made a better fist of dealing with the new ball second time around and were 64-0 at stumps.
It was a frustrating morning for Ireland as they went in search of the last four Pakistan wickets.
Tim Murtagh removed Shadab Khan (55) with the new ball, courtesy of a dubious lbw decision, but they had to wait another 11 overs for the next wicket.
It was a beauty when it came though, Stuart Thompson getting the ball to jag from outside leg and take Faheem Ashraf's edge (83) on its way through to Niall O'Brien.
Amir then edged Murtagh behind and Pakistan declared soon after, giving themselves half an hour to get stuck into Ireland top order before lunch - and they did just that.
Ed Joyce (4) could join Shadab in wishing DRS was available in this match as he was adjudged lbw to Abbas despite replays showing the ball pitched outside leg but Andy Balbirnie (0) could have no such complaints as he was hit plumb in front, again by Abbas.
Amir then uprooted William Porterfield's (1) off stump with the last ball of the session to leave Ireland stunned at 5-3.
That became 7-4 when Niall O'Brien (0) became Abbas' third lbw victim. O'Brien and Wilson showed some resilience but Shadab (3-31) was a constant threat with his leg-spin and wrapped up the innings with Ireland well short of avoiding the follow on.
It was a different story for Ireland in their second innings but they needed some luck to get through another probing new ball spell for Mohammad Amir, both Joyce (39no) and Porterfield (23no) benefitting from dropped catches.
Amir was forced to come out of the attack after three overs and was then only able to bowl two deliveries before being withdrawn on his return will concern Pakistan ahead of their two-Test series in England and without the left-arm quick to contend with, Ireland's openers chipped away at the tourists' lead as they batted through to the close.
Day two report
Ireland were left frustrated by Pakistan's seventh-wicket stand of 109 runs in the first day of play in their inaugural Test in Malahide.
After a washout on Friday, Ireland, the 11th nation to compete in the longest format, finally took to the field on Saturday and claimed their first two wickets in successive deliveries having won the toss.
Prior to tea the tourists had been reduced to 159 for six, but teenager Shadab Khan and Test debutant Faheem Ashraf then came to the crease and guided their team to 268 for six before bad light and rain brought an early end to proceedings.
Having lost a battle against the elements on Friday, Ireland's first ball as a Test nation took place with the sun shining and under clear skies.
Eleven months after being granted full membership and 25 years after being awarded associate status, the historic moment did prove memorable.
Pakistan opener Azhar Ali attempted to scoot through for a quick single and Imam-ul-Haq, the nephew of former international batsman Inzamam, collided with Niall O'Brien, forcing a delay while he was attended to.
Both Azhar and Imam would depart for single figures, the former to a back-of-a-length delivery from Boyd Rankin - the only Irish player with previous Test experience with England - before Imam was trapped in front by Tim Murtagh from the very next ball.
There would be no further breakthroughs until the second session, which proved productive for the home side's bowlers.
Shortly after the resumption, Haris Sohail became Stuart Thompson's first Test victim when he prodded to Irish captain William Porterfield at gully on 31, and Murtagh then tempted Babar Azam to edge to Paul Stirling at second slip.
Asad Shafiq had looked at ease until he pulled a delivery from Rankin straight to Andrew Balbirnie at square leg to depart for 62 and leave Pakistan five down.
Ireland claimed their sixth wicket, with only 159 on the board, when Pakistan captain Sarfraz Ahmed was caught at second slip to become Thompson's second victim.
However, Ireland soon learned about the ebbs and flows of Test cricket as Shadab and Ashraf came together to rebuild the innings in the third and final session.
Porterfield returned to his front-line attack of Rankin and Murtagh and both came close to making a breakthrough, with Gary Wilson dropping a chance at first slip to remove Ashraf.
O'Brien then also failed to take an opportunity, which Wilson may have snagged had he not dived in his way, to dismiss Ashraf in a Rankin over that cost 18 runs.
The debutant also brought up his half-century during that period and Shadab soon brought up the landmark too.
Ahead of the new ball being available, Porterfield turned to spinner Stirling and Ashraf even heaved a delivery from him into the stands for the contest's first maximum.
The players came off just after that for bad light and thunder and heavy showers meant they would not return, with Shadab on 52 and Ashraf on 61.
Day one report
Ireland's long-awaited Test match debut was delayed by the elements on Friday, with the first day of their historic contest against Pakistan washed out.
Heavy rain overnight on Thursday in Malahide prevented the nation's inaugural five-day match beginning on time and the strong wind and steady drizzle continued throughout Friday.
When umpires Richard Illingworth and Nigel Llong surveyed the scene at 1500 BST, a heavy downpour just before had left puddles on the outfield and it was soon confirmed no play would be possible.
Ireland will become the 11th nation to play a Test, 25 years after the International Cricket Council awarded them associate status and 11 months after they were granted full membership.
Cricket Ireland had already sold 5,100 tickets out of a possible 6,300 for the first day at Malahide Cricket Club, and all of those supporters will now receive a full refund.
It means that the governing body stand to lose 75,000 euros from Friday's washout, with chief executive Warren Deutrom having previously claimed the total cost of staging this inaugural Test would be "around 1million euros".
Shortly after the umpires made the call, the rain ceased and the skies cleared, and Duetrom is hopeful that Saturday will bring better weather given 4,000 fans have already purchased tickets.
"There was a huge sense of excitement and anticipation about today, and a massive sense of pride," he said.
"As we were getting to half two, three and the rain was hammering down, even if suddenly it had cleared and the guys said, 'Let's get out there for a number of overs at five o'clock', it probably would have been an inappropriate, underwhelming way to have started our bow in Test cricket.
"If we can get some walk up with good weather (on Saturday), hopefully it will be a more appropriate environment to start our first ball in Test cricket. Of course it's disappointing but what I don't want to do is go around with a massive long face, projecting misery because it isn't that. We're still hugely proud."