Imam, the nephew of Pakistan selection chief and former Test batsman Inzamam-ul-Haq, scored a hundred on his one-day global debut against Sri Lanka past year.
Ireland left out spinner Andy McBrine, with Stuart Thompson completing an all-pace attack led by Boyd Rankin, who played one Test for England before requalifying, and experienced Middlesex seamer Tim Murtagh. Boyd Rankin got Ireland's first wicket, while Tim Murtagh got the second.
Former England global Boyd Rankin (1-7 off seven overs) had the honour of taking Ireland's first-ever Test wicket with Azhar (4) edging him to second slip.
However, when the sun came out on Saturday and Ireland captain William Porterfield asked Pakistan to bat first, it took just one ball before the game was once again delayed.
With the first day having been washed out due to persistent rain, Ireland finally took to the field in their first-ever Test match as they won the toss and opted to bowl first.
Murtagh got the full treatment from his team-mates and there was nearly a third wicket next ball, but Stuart Thompson was wide of the stumps where a direct hit would have seen the end of Haris Sohail, who was well out of his crease backing up.
Azhar Ali (4) and Imam-ul-Haq (7) were sent in to bat before a weird start saw the latter involved in a nasty collision with both Tyrone Kane and wicketkeeper Niall O'Brien following the very first delivery.
Imam (7) went the very next ball, to Murtagh, struck on the kneeroll and given out lbw to leave Pakistan at 2-13.
With Pakistan in a spot of bother at 159/6, Ashraf and Shadab came to the rescue as they amassed an unbeaten 109-run partnership, during which both batsmen brought up their half-centuries, before bad light brought play to an end for the day.
After a few near run-outs, Pakistan's third-wicket duo settled in.
After a brief delay, Imam was able to carry on, with no wicket lost.
Babar Azam (14), pushing hard at a Murtagh delivery that left him off the pitch, was well-held by Paul Stirling at second slip.
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. Captain Sarfraz Ahmed (20) soon bowed out, too.
Faheem blasted his way to 61 off just 69 balls while Shadab showed that he has to be considered an allrounder.