Amir's three wickets earlier in the day had put Pakistan into a position from which an innings win seemed entirely possible - even likely - but O'Brien and Stuart Thompson combined for a 114-run rearguard that not only pushed Ireland in front and burnished local pride, but allowed them to sleep on the possibility of another famous upset.
Ireland's first Test match in worldwide cricket took a lengthy little spell of 144 years to take place but it started with a bang as, in the opening ball of the match, two Irish players collided firmly with Pakistan batsman Imam-ul-Haq, leaving him sprawled on the deck.
Ireland showed some excellent temperament with the bat in the second innings after following-on, as they ended day four of the Dublin Test with a score of 319 for 7.
Set a seemingly modest 160 to win on the last day, Pakistan collapsed to 14 for three, having made Ireland follow-on earlier in the match.
But after lunch Amir, in his 31st match at this level, took his 100th Test wicket when Gary Wilson was held in the slips by Haris Sohail to leave Ireland struggling at 157 for six.
Ronda Rousey Scheduled For Major Match At WWE 'Money In The Bank'
On Monday, it was reported that Ronda Rousey will be facing Raw Women's Champion Nia Jax at the Money in the Bank pay-per-view . Well, WWE didn't take long to confirm the match via Twitter.
"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.
His effort not just saved Ireland from an embarrassing defeat, but also gave his bowlers some runs to bowl at the visitors that in turn helped them make a match out of it.
An occasion filled with emotion and pride, Ireland dared to dream during a frenetic half an hour this morning but, in the end, were beaten in their maiden Test, suffering the same fate as eight of the other 10 full member nations. Babar Azam was with him on 9.
The partnership built between the two shows great signs for Pakistan's upcoming test against England in Lords, most notably Imam's outstanding batting performance.
But Thompson's single off all-rounder Faheem meant Pakistan would have to bat again, while Kevin O'Brien was looking increasingly assured.
The foreign Ministers of China and Iran negotiated a nuclear deal
Earlier, Russia expressed "deep disappointment at the decision by trump" on the U.S. withdrawal from the Iranian nuclear deal. In Iran, the news of the fighting was reported as a conflict between Syria and Israel.
Ireland players after Pakistan secured a five-wicket win. In addition, Pakistan enforced follow-on after 16 years.
"I think it's very good for Pakistan as a team to chase this on the fifth day". There were 11 caps being handed out, we had all our family and friends here and with all the build up to the game there were a lot of emotions for every lad, so to go out and start how we did was fantastic.
Following-on, Ireland started the fourth day on 64 without loss.
Cricket Ireland have said that one or two Test matches a year will probably be the limit that the Ireland side will play.
This was a game to display the true folly of the ICC's exclusionary policy in Test cricket with Ireland showing that the game's oldest form could only benefit from fresh blood, that the sport is only dying out while its governing body allows it to.
Allardyce claims 'massive offer' needed for Rooney to leave Everton
Confident? I can't quite say confident after all the rumours I'm reading in the paper", Allardyce said after a 3-1 defeat. "Generally there's no smoke without fire".
3 - Andy Balbirnie became the first No.3 player in Test cricket to bag a pair on Test debut.