When lightning stopped play Pakistan were 268 for 6 and Shadab (52*) and Faheem (61*) were looking in control at the crease. Shadab (52) and Faheem (61) helped the sinking ship with their unbeaten 109-run partnership.
And they were aided by the excuse that Ireland were on top for most parts of the first two sessions, troubling the Pakistani batsmen with the moving ball, and bagging as many as six wickets before Faheem Ashraf and Shadab Khan combined to put on a century stand en route their respective fifties and seized the initiative.
Ireland and Afghanistan were accorded Test status by the International Cricket Council past year after they had applied to the ICC to upgrade their status from Associates.
Tyrone Kane and Niall O'Brien collide with Imam-ul-Haq.
Ireland skipper William Porterfield won the toss and elected to field in front of a sizeable crowd at The Village (Malahide Cricket Club), Dublin.
Ul-Haq, nephew of legendary Pakistan captain Inzamam, did not appear to suffer too many after-effects although it did take him 16 balls to get off the mark before he drove Murtagh stylishly for four through the off side. The action on the sun-kissed day was a joy for the Irish supporters as the hosts made an outstanding with the ball, taking two wickets for just 13 runs in the match.
Pace bowlers Tim Murtagh, Boyd Rankin and Stuart Thompson all took two wickets apiece.
The very next ball saw Imam trapped leg before for just 7 as Tim Murtagh got in on the act. But, in hindsight, given what the forecasts had predicted, both teams, especially Ireland, would be happy with the amount of cricket that eventually took place.
Ireland's historic first Test wicket was actually Rankin's second in Tests though, his first came in his solitary England Test appearance against Australia in Sydney, during the 2013/14 Ashes.
The wickets of Shafiq (62) and Sarfaraz Ahmed (20) left Pakistan in all sorts at 159 for 6 and their last two recognized batsmen at the crease.
Babar Azam (14), pushing hard at a Murtagh delivery that left him off the pitch, was well-held by Paul Stirling at second slip.