Ireland came up short in their bid to pull off a miracle in Malahide as they were beaten by five wickets in their enthralling inaugural Test with Pakistan.

Hopes of an unlikely home victory were raised on the final day when the tourists, chasing 160, crashed to 14 for three, yet half-centurions Imam-ul-Haq and Babar Azam helped Pakistan home ahead of their meeting with England at Lord’s next week.

The result had appeared to be a foregone conclusion on Sunday when Pakistan made Ireland follow-on due to their 180-run lead, but Kevin O’Brien’s century guided the hosts to 339 second time around.

That knock ended on 118 to his first ball on Tuesday and despite further fireworks early in Pakistan’s innings, Ireland were unable to record what would have been only the fourth win in Test history for a side following on.

As Pakistan warmed up on the final morning, they could hear Daniel Powter’s ‘Bad Day’ playing, but if it was meant to be psychological warfare it did not work as Mohammad Abbas took the final three Irish wickets within 40 minutes.

O’Brien, who had been pivotal to Ireland’s fightback on Monday, fell to his first ball of the day chasing a wider delivery and nicking to slip.

Ireland lost their final three wickets early on Tuesday (Niall Carson/PA)
Ireland lost their final three wickets early on Tuesday (Niall Carson/PA)

Boyd Rankin and Tyrone Kane soon followed, both bowled by Abbas, who returned five for 66 in the innings, and nine for 110 in the match, as Ireland added just 20 to their overnight score.

The 160 target was still enough to make the chase intriguing and the drama grew once Tim Murtagh and Rankin made early inroads.

Azhar Ali’s tactic of dancing down to Murtagh proved short-lived as a shaped delivery did for him and he edged through to first slip from the innings’ fourth ball.

Ireland had reduced Pakistan to 14 for three (Niall Carson/PA)
Ireland had reduced Pakistan to 14 for three (Niall Carson/PA)

Pakistan then slipped to 13 for two for the second time in the match when Haris Sohail attempted one drive too many and picked out Ed Joyce at gully off Rankin.

And when Murtagh struck again, bowling Asad Shafiq through the gate, Ireland sensed a stunning success.

Only England in 1894 and 1981, and India in 2001, had even won a Test after following on, and no country had won their inaugural fixture in the longest format since Australia won the first ever Test in 1877.

The 11th Test nation’s optimism began to dissipate with Imam and Azam at the crease, though the former was fortunate an edge dropped short off Murtagh and the latter was almost undone by a Rankin yorker.

Imam, in particular, looked at ease and was scampering between the wickets – a trait his uncle Inzamam-ul-Haq was not renowned for during his career – as Pakistan reached lunch 52 for three, needing 108 more.

Ireland could not afford any missed opportunities and Andrew Balbirnie, who got a pair with the bat, endured another moment to forget at third slip when he put down Azam from his first ball faced in the second session.

With the threat of rain to come later in the day, Pakistan sensed the need to accelerate against attacking Irish fields and Imam soon moved to his maiden 50 before Azam progressed to his fifth.

Balbirnie at least had some reason to remember this match fondly when his throw back to Stuart Thompson at the non-striker’s end ran out Azam on 59.

Thompson then pinned Sarfraz Ahmed in front but Pakistan got over the line prior to tea, with Imam unbeaten on 74.