Saud Shakeel is on 42 not out and Salman Agha has 10, with the Pakistan duo to resume on the second morning after weathering late pressure with the new ball from the visitors.
South Africa will rue not making further inroads into the home batting line-up after missing several chances in the field on a wicket that is so far playing true.
Pakistan won Monday's toss and elected to bat on a pitch that is expected to take spin later on - Pakistan have awarded a Test debut to 38-year-old left-arm spinner Asif Afridi.
Off-spinner Simon Harmer (2-75) grabbed the wicket of opener Imam-ul-Haq (17) with a beautiful delivery that pitched on leg stump and hit the top of off, showcasing the turn on offer.
But the visitors were their own worst enemies after that, as chance after chance went down and Masood and Abdullah Shafique (57) put on 111 for the second wicket.
The latter was caught down the leg-side off the bowling of Harmer and Babar Azam (16) was caught off a sharp chance diving forward from short-leg by Tony de Zorzi as South Africa finally took an opportunity in the field.
Left-arm spinner Keshav Maharaj (2-63) was the bowler and he also grabbed the wicket of Masood when he attempted a sweep and top-edged the ball to Marco Jansen at square-leg.
South Africa delayed taking the new ball but when they did, Kagiso Rabada trapped Mohammad Rizwan (19) leg before wicket.
"Bit frustrating, but no one means to drop chances," Maharaj said. "It was nice to see the guys bounce back and take the catches that they did. It was an even-Stevens day, I felt if we got one more wicket at night we'd probably have had a little bit of an upper hand."
Pakistan won the first Test in Lahore last week by 93 runs. Defeat for South Africa marked a losing start to the defence of their World Test Championship crown at the beginning of a new two-year cycle.Â
with AP