In a historic first, Ireland is now hosting Pakistan in a Test fixture, after receiving the status from ICC past year.
Abbas in just his sixth Test match took Boyd Rankin and Tyrone Kane's wicket next, completing a five-wicket haul.
For half an hour Ireland dared to dream: a great big, vivid, roller-coaster of a hallucination really, as Pakistan wickets fell and the thought of an stunning victory on the final day of the inaugural Test match looked on.
However, the dashing Ireland batsman got out cheaply on day 5 and Mohammad Abbas picked up 5/66 to bowl Ireland out for 339, setting Pakistan a target of 160.
Even a draw would be a marvellous achievement for a country which was awarded Test status only last June.
Pakistan bowling coach Azhar Mahmood suggested after stumps on Sunday that Amir's lengthy time away from the game allied to the fact he had been involved in all three worldwide formats-Tests, one-dayers and Twenty20s-since coming back had taken a toll on the swing bowler.More news: Mahathir to continue as Malaysia PM for 1-2 years
More news: Cannes 2018: Mahira Khan dazzles on the red carpet
More news: Protesters arrested during Indianapolis stand
Emboldened by Kevin O'Brien's history-making century yesterday evening, Ireland struck three times before lunch to leave the outcome of the Test match very much in the balance heading into the afternoon session.
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.
Babar was dropped on 13, when Andrew Balbirnie failed to hold on to catch off Murtagh's bowling at third slip, and the fourth-wicket partnership went into three figures and got Pakistan within 20 runs of victory before the final act of a thrilling Test was played out.
But Thompson's single off all-rounder Faheem meant Pakistan would have to bat again, while Kevin O'Brien was looking increasingly assured.
Niall O'Brien was the hero when Ireland beat Pakistan at the 2007 World Cup, scoring a calm and assured 72 amid all the madness as Trent Johnston's team of part-timers shocked the world of cricket at Sabina Park, Kingston.
Pakistan took the new ball with Ireland 193 for six but Kevin O'Brien´s response was to clip Abbas for a legside boundary.