Taunton - Former England batsman Marcus Trescothick rolled back the years as he defied Pakistan with an unbeaten 95 for Somerset at Taunton on Tuesday.
Somerset, set an unlikely 468 for victory, were 157 for two at tea in their second innings.
Trescothick was now just five runs shy of his 47th first class-hundred for Somerset -- the same number as West Indies great Vivian Richards managed for the south-west county.
Left-hander Trescothick put on 98 with Tim Rouse, who made a gutsy 41 on his Somerset first-class debut after being hit on the head by Mohammad Amir.
Somerset had collapsed to 128 in their first innings, with left-arm paceman Amir taking an impressive three for 36.
However, a sunny day at Taunton meant there was now less swing in the air for Pakistan's pacemen.
The 40-year-old Trescothick was caught behind off Amir for just eight in the first innings.
However, he drove both Amir and Sohail Khan down the ground on Tuesday.
But Adam Hose was out off what became the last ball before lunch when he was lbw to leg-spinner Yasir Shah for eight after he missed a ball that went straight on.
Rouse had made 14 when he ducked into a sharp Amir short ball, turning his head away in the process, and was struck on the helmet.
A concerned Amir raised his hand in apology and Rouse, who changed helmets, needed at least five minutes of on-field treatment before resuming his innings.
But soon afterwards he gamely cover-drove Amir for four.
Trescothick drove Shah for six over long-on and then struck two boundaries in as many balls off Khan.
But Rouse fell in similar fashion to Hose when he was lbw to Shah's quicker ball.
Earlier, Azhar Ali made an unbeaten century in Pakistan's second innings 236 for four declared.
Ali (101 not out) and Asad Shafiq (69 not out) shared a stand of 138 in 30 overs.
Pakistan resumed Tuesday on 140 for four, with Ali 50 not out and Shafiq unbeaten on 26.
The pair were especially severe on Somerset's spinners with the 31-year-old Ali hoisting teenager Dom Bess for two huge sixes over long-on in successive balls.
As soon as Ali had gone to his century, in 168 balls including 12 fours and two sixes, Pakistan captain Misbah-ul-Haq declared.
Former spot-fixer Amir took three wickets in 11 overs in Somerset's meagre first innings as he swung the ball late at sharp pace.
Amir's exciting career came to a shuddering halt during a Lord's Test in 2010 when he and new-ball partner Mohammad Asif were caught bowling no-balls to order on the instructions of captain Salman Butt as part of a tabloid newspaper sting operation.
All three received five-year bans from cricket and jail terms.
Amir, who served three months in an English young offenders institute, has only featured in the game's shorter formats since his return to Pakistan duty in January.
But the 24-year-old left-armer is now back in England and could make his Test return in the first of a four-match series at Lord's on July 14.