Pakistan secured a first-innings lead of 164 over Sri Lanka on day three of the second Test in Dubai before Sri Lanka hit back to reduce the deficit to 76 by stumps.

Tharanga Paranavitana (42 not out) and Kumar Sangakkara (29 not out) fought hard on a deteriorating pitch after their side had been put under severe pressure to close on 88 for one in their second innings.

Pakistan were eventually bowled out for 403 in their first innings in reply to Sri Lanka's 239 with Asad Shafiq completing a fluent half-century while both Dammika Prasad and Tillakaratne Dilshan returned three-wicket hauls.

Misbah-ul-Haq (41) fell early in the day when he was caught by Mahela Jayawardene off Chanaka Welagedara, who quickly struck again to remove nightwatchman Saeed Ajmal, who was caught by Angelo Mathews for 20 as Mathews atoned for an earlier miss.

Shafiq then made his way confidently to 59 in 101 balls, hitting four fours and one six down the ground with Adnan Akmal adding a punchy 41 in 80 deliveries as the pair put on 70 for the seventh wicket.

Shafiq fell when he guided Prasad to Jayawardene in the gully and after Abdur Rehman (0) and Umar Gul (2) were despatched by Rangana Herath, Akmal fell when he was caught by Kaushal Silva off Dilshan.

Sri Lanka made their way cautiously to 22 in reply before losing the wicket of Lahiru Thirimanne, who fell when Misbah turned to Mohammad Hafeez and reaped the dividend when the off-spinner delivered a beauty that clean bowled him.

Paranavitana, who has faced 141 balls and Sangakkara, who has kept out 86, faced plenty of nervous moments from spinners Hafeez, Rehman and Ajmal but survived to fight another day - with Sri Lanka still facing a huge task to get back into the game.

The opening Test between the two sides was drawn when Kumar Sangakkara propped up Sri Lanka's second innings with a double-century; the sort of innings that is required of him, or one of his team-mates, once again.