Pakistan have beaten Ireland by five wickets in their Test match at Malahide.
They saw off a spirited fightback from the home side who were playing in their maiden Test.
Ireland, the 11th nation to play the longest format, were attempting to become the first country to win their inaugural Test since Australia did so in the very first Test in 1877.
Furthermore, there have only been three previous occasions where a country has won a Test having been forced to follow-on - England in 1894 and 1981, and India in 2001 - but a miracle in Malahide proved beyond them despite Kevin O'Brien's 118 with the bat.
Ireland lost centurion O'Brien to the first ball he faced on the final day of their historic Test with Pakistan.
The unbeaten 118 O'Brien made on Monday raised hopes of Ireland drawing, or even winning, their contest, but he was unable to add to his overnight score when he unnecessarily went chasing a wide delivery from Mohammad Abbas and nicked through to slip.
O'Brien departed with Ireland 141 ahead and two second-innings wickets remaining.
It did not take Pakistan long to get those last two wickets and less than 40 minutes after play began, Ireland, who had been made to follow-on, were all out for 339.
Abbas bowled both Boyd Rankin, who played on when attempting to leave, and then Tyrone Kane, to give him innings figures of five for 66 and a match haul of nine for 110.
That meant Pakistan were left needing 160 to secure victory.
Ireland needed to make early inroads if they were pull off an improbable victory and that is exactly what they got as Pakistan slumped to 14 for three.
Tim Murtagh made the first breakthrough, with the fourth ball of the innings drawing Azhar Ali's edge, and Haris Sohail also found a fielder off Boyd Rankin's bowling.
Murtagh then bowled Asad Shafiq to leave the home side ecstatic.
Imam-ul-Haq and Babar Azam stopped the rot and looked well-set when the tourists were 52 for three at lunch, needing 108 more for victory.
The tourists were indebted to the duo's stand of 126, Imam-ul-Haq was 74 not out while Babar Azam scored 59, in an enthralling encounter.
Ireland had been bidding to emerge victorious despite following on, but a miracle in Malahide proved beyond them as Pakistan held on to win.