Pakistan became only the second team in history to have their top four batsmen all score a century in an innings as the hosts closed in on victory over Sri Lanka in the second Test.
Captain Azhar Ali (118) and Babar Azam (100 not out) reached their tons on day four after openers Shan Masood (135) and Abid Ali (174) did so on day three.