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.
Murtagh hurled in the opening ball to Pakistan batsman Azhar Ali, who got the briefest of touches, before making a run for the opposite stumps.
But the 22-year-old left-hander, who hit a hundred on his one-day worldwide debut against Sri Lanka last year, has made fifties against both Kent and Northamptonshire in Pakistan's two warm-up matches ahead of this one-off Test.
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.
William Porterfield's decision was rewarded nearly immediately as Rankin and Murtagh, among the more senior members in the side, picked up a wicket each to break Pakistan down to 13 for 2 inside the first ten overs.
The 22-year-old left-hander was left flat on the ground and needed several minutes´ treatment on the field.
Pakistan's team includes leg spinner Shadab Khan, who took 10 wickets in a warm-up win over Northamptonshire.
Pakistan too fielded two debutants - Imam-ul-Haq and Faheem Ashraf.
Duly reprieved, he went to fifty in just 52 balls, including seven fours, with Shadab following him to the landmark in 89 balls. Faheem, however, did have a break when, on 36, he edged Rankin only for a diving Niall O'Brien to miss the catch and give the obscured Gary Wilson at first slip no chance of taking the ball.