Openers Mohammad Hafeez (17) and Imran Farhat (4) played out the final ten overs before lunch to reach 21 without loss at the interval, with their team still requiring 213 runs to avoid an innings defeat.
Lara scored 216 in a total of 591 as Pakistan picked up the last five wickets for 82 runs in the morning session, leg spinner Danish Kaneria finishing with 5-181 for his 12th five-wicket haul.
Hafeez survived on five when Dave Mohammed was unable to hold on to a difficult chance at short mid-on after a miscued pull shot off Jerome Taylor.
There was also a confident leg before appeal against Hafeez by Taylor as West Indies pushed to level the three-match series after losing the first Test in Lahore by nine wickets.
Lara resumed on 196 with the West Indies on 509-5 and needed 11 more balls to completing his double hundred.
He has now scored four hundreds in his last four Tests against Pakistan and 34 tons in 130 appearances.
The elegant left-hander batted for 383 minutes and 241 balls before driving pacer Umar Gul through the off-side for three runs to reach his milestone.
Kaneria who was savaged by Lara on the third day, having conceded 60 runs from 29 balls in one forgettable spell, got his revenge when he had Lara caught at wide long-on by Shoaib Malik.
Lara's 216 runs included 24 fours and seven sixes from 262 balls after he had seen Denesh Ramdin fall for 11 runs after getting a nick off Shahid Nazir to keeper Kamran Akmal.
Dave Mohammed, however, provided more excitement towards the end of the innings with some powerful shots, hitting Kaneira for two big sixes, including a brilliant swipe over extra cover to push the score.
He made 36 from 56 balls before being stumped off Kaneria, who has taken 177 wickets in 42 Tests.
Abdul Razzaq cleaned up the tail in the space of three deliveries, trapping Taylor and Daren Powell leg before wicket.