Starting the day on 319 for seven with Kevin O'Brien resuming on 118, Ireland were only able to add 20 runs to their overnight total to set Pakistan a target of 160.
Pakistan cricket team captain Sarfraz Ahmed praised the character of young batsmen Imam-ul-Haq and Babar Azam after they ensured his decision to enforce the follow-on in the Ireland cricket team's inaugural Test did not backfire.
For all that early excitement though, Pakistan gradually took the game away from Ireland, thanks in no small part to 22-year-old Imam, who batted with patience and a sound technique to end on a well-made 74*.
Imam shared a vital 126-run stand with Babar Azam (59) for the fourth wicket.
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.
Abbas took his second five-wicket haul in Test cricket, in his sixth game, to finish with figures of 5-66 in 28.3 overs.
Not since Australia's defeat of England in 1877 has a Test debutant won their opening match but Pakistan were struggling to build a partnership that could stop Ireland's bowlers.
"They have a quality line-up but if we had got another couple and break that partnership, then it's completely game on", added Porterfield, reflecting on the missed opportunity to cause another major shock in world cricket.
They trailed their visitors by 116 runs coming into the fourth day of the five-day series in sunny Malahide on the Dublin coast.
It was just after 6.15pm that Kevin O'Brien pushed a ball from Mohammad Amir through the covers for runs that made him a national cricketing hero, for the second time in his career.
Soon after, the tourists were breathing a sigh of relief, as Imam, who finished with an unbeaten 74, completed a five-wicket win.
Even a draw would be a marvellous achievement for a country which was awarded Test status only last June.
Yet the controversial decision to shrink the 2019 World Cup in England to a 10-team tournament and Ireland's failure to come through an increasingly competitive qualifying tournament where only two spots were available means Porterfield's men will be on the outside looking in next year.
Boyd Rankin followed up closely with another outing leaving Pakistan 13-2 - before Murtagh claimed his second of the innings bowling out Asad Shafiq as Pakistan moved to 14-3.
"I think it was a fantastic team effort, yesterday belonged to Kevin and very well supported by Tommo and TK".
The day didn't start as brightly for the Irish boys as they would've hoped.
"To get there is a great honour and hopefully now we've put ourselves in a good position to try and go ahead and win it and there's no reason why we can't", he said at the close.
3 - Andy Balbirnie became the first No.3 player in Test cricket to bag a pair on Test debut.