Pakistan were 268 for six after losing the toss when bad light and then rain forced an early close to the second day of Ireland s inaugural Test at Malahide on Saturday.
Faheem Ashraf marked his Test debut with 61 not out and teenager Shadab Khan, in only his second match at this level, also hit a maiden Test fifty to be unbeaten on 52.
The pair had so far added an unbroken 109 for the seventh wicket after Pakistan had been struggling at 159 for six after losing the toss following a total washout on Friday s first day of this stand-alone match.
Pace bowlers Tim Murtagh, Boyd Rankin and Stuart Thompson all took two wickets apiece.
There was drama at a sun-drenched Malahide even before the wickets fell, with Pakistan debutant Imam-ul-Haq injured off the first ball of the match.
Azhar Ali dug out a Murtagh delivery and called for a quick legside single.
Non-striker Imam, in scrambling to complete the run, found himself sandwiched between wicket-keeper Niall O’Brien and Tyrone Kane in a heavy collision.
The 22-year-old was left flat on the ground and needed several minutes’ treatment on the field, but he recovered to face the second ball of the match, with Imam playing and missing.
Imam, the nephew of Pakistan selection chief and former Test batsman Inzamam-ul-Haq, scored a hundred on his one-day international debut against Sri Lanka last year.
The left-hander, who came into this match following fifties in Pakistan’s two warm-up fixtures, against Kent and Northamptonshire, square-drove Murtagh for a stylish four.
But it did not take long for Ireland to make a stunning double strike.
Rankin had an uncertain Azhar (four) edging to Porterfield at second slip.
That left Pakistan 13 for one off the last ball of the eighth over.
Barely had the crowd’s cheers subsided, then Pakistan were 13 for two off the very next ball.
Imam was lbw for seven to a Murtagh delivery that came back into him.
After a few near run-outs, Pakistan’s third-wicket duo settled in.
Shafiq square-cut Kane for four, with left-hander Haris glancing Thompson for a legside boundary.
Pakistan, 67 for two at lunch, lost their third wicket soon afterwards when Haris was caught in the gully by Porterfield off Thompson.
Babar Azam (14), pushing hard at a Murtagh delivery that left him off the pitch, was well-held by Paul Stirling at second slip.
Shafiq went on to complete a 107-ball fifty when he pulled Rankin for a single.
But with the towering Rankin, bowling from around the wicket, a similar shot proved Shafiq’s undoing when he found Andrew Balbirnie at square leg.
And when Pakistan captain Sarfraz Ahmed (20) was caught by Stirling in the slips off Thompson, the tourists were 159 for six in this stand-alone match.