Master batsman Lara scored a stubborn 122 before off-spinner Mohammad Hafeez trapped him in front of the wicket to leave the West Indies reeling at 252-7 at tea on the fourth day at the Gaddafi stadium here on Tuesday.
The tourists still needed another 27 runs to avoid an innings defeat, with Shivnarine Chanderpaul unbeaten on 66 at the break and Dave Mohammed yet to get off the mark.
Lara proved to be the main obstacle between the home team and victory, defying the Pakistan attack admirably in the first session and leading a fighting 137-run stand for the fifth wicket with Chanderpaul.
Lara batted with resolve as he cut and drove beautifully on a weary pitch.
The 37-year-old left-handed batsman let loose after lunch, hitting leg-spinner Danish Kaneria for two successive fours and then reaching his century by cutting fast bowler Umar Gul for his 16th boundary.
Pakistan captain Inzamam-ul-Haq rang desperate changes to dislodge the pair and brought in Hafeez, who had Lara leg before off a miscued sweep.
Lara hit 19 boundaries during his 215-ball knock.
Next over, Chanderpaul, who batted with discomfort after suffering from a stomach bug for three days, survived a stumping off Kaneria when he was 56.
Gul, who was the best Pakistani bowler with 3-89, then removed Dwayne Bravo leg-before for three and Kaneria had Denesh Ramdin caught at forward short-leg for one.
Resuming at 74-3 this morning, the West Indies lost nightwatchman Fidel Edwards in the eighth over of the day when paceman Shahid Nazir forced an edge to the slip where Younis Khan took a low catch. Edwards made 10.
Pakistan gave Lara a reprieve on 48 when Hafeez failed to hold a low catch at gully off Gul and the West Indian captain made the home side pay for the lapse for another three hours.