A brilliant innings of 174 by man of the moment Abid Ali powered Pakistan to a commanding 395-2 on the third day of the second and final test on Saturday, a lead of 315 runs over Sri Lanka.

Captain Azhar Ali (57) and Babar Azam (22) were unbeaten at the close of play, but it was Abid and Shan Masood (135) who stole the show earlier with a huge opening stand of 278.

Abid, 32, playing in only his second test, became the first Pakistan batsman to score centuries in each of his first two matches. He smacked 21 fours and a six in a 281-ball knock that was ended when Lahiru Kumara trapped him lbw.

Pakistan's Abid Ali, right, celebrates his century with teammate Shan Masood against Sri Lanka during the third day of their second Test cricket match at National Stadium in Karachi, Pakistan, Saturday, Dec. 21, 2019. (AP PhotoFareed Khan)

Pakistan's Abid Ali, right, celebrates his century with teammate Shan Masood against Sri Lanka during the third day of their second Test cricket match at National Stadium in Karachi, Pakistan, Saturday, Dec. 21, 2019. (AP PhotoFareed Khan)

The opening stand was the second highest in Pakistan's history, after the partnership of 298 shared by Aamir Sohail and Ijaz Ahmed against West Indies in Karachi in 1997.

Masood, 30, stuck seven fours and three sixes in a 198-ball stay. He went when he top-edged a short delivery from Kumara to Vishwa Fernando at deep square leg. It was the second century of his test career and came in his 19th appearance.

With the wicket drying out and offering little to the bowlers, Sri Lanka spent an arduous day of toil in the field.

Pakistan's Abid Ali hits a boundary against Sri Lanka during the third day of their second Test cricket match at National Stadium in Karachi, Pakistan, Saturday, Dec. 21, 2019. (AP PhotoFareed Khan)

Pakistan's Abid Ali hits a boundary against Sri Lanka during the third day of their second Test cricket match at National Stadium in Karachi, Pakistan, Saturday, Dec. 21, 2019. (AP PhotoFareed Khan)

The first test in Rawalpindi ended in a draw.

More AP sports: https://apnews.com/apf-sports and https://twitter.com/AP_Sports