Jonathan Trott and Stuart Broad hit centuries at Lord's on Friday to save England with a record eighth-wicket stand after Pakistan fast bowler Mohammad Amir had blown away the early batting in the fourth and final Test.
Trott batted all day to reach 149 not out, adding 244 with Broad (125 not out) to lead England to 346 for seven in their first innings at the close of the second day.
Broad, in an innings of genuine quality, scored his maiden Test century and the first by an England number eight since John Murray against West Indies in 1966.
His partnership with Broad is an England record for the eighth wicket against Pakistan, and the second highest against any country.
The hosts, 2-1 up in the series, were reduced to 47 for five in the morning session after resuming on 39 for one. Only 12.3 overs were bowled on Thursday
Eighteen-year-old Amir picked up six for 73 in 23 outstanding overs. He took four wickets in eight balls without conceding a run from the Pavilion end, dismissing Alastair Cook (10) and Kevin Pietersen (0) caught behind from consecutive deliveries.
Paul Collingwood was then trapped lbw for a duck and Eoin Morgan was smartly caught at second slip by Yasir Hameed, also without scoring.
It was the first time the England number four, five and six had failed to score in a test innings.
Amir became the youngest player to capture 50 Test wickets when Matt Prior was caught behind for 22 from the fourth delivery after lunch.
Graeme Swann was then caught in the gully by Azhar Ali off Amir for yet another duck.
England, on 102 for seven, were in danger of succumbing for fewer runs than their previous lowest score of 130 against Pakistan.
Instead Trott and Broad combined in a memorable partnership which flourished as the Pakistan bowlers tired and the sun finally broke through to sap any remaining moisture from the pitch.
Trott moved confidently on to the front foot to drive through the covers and the mid-wicket area while Broad played like a top-order batsman.
He flicked Amir for a six over square-leg and played the shot of the day with a blazing off-drive from the same bowler.
Trott, who scored 226 in the Lord's Test against Bangladesh this year, reached his century, courtesy of overthrows which raced to the boundary, in five minutes short of five hours with 13 fours.
Broad surpassed his previous highest test score of 76 and moved serenely to his hundred from 159 balls with nine boundaries and a six. His father Chris scored six Test centuries as an opening batsman but none of them were in England.
He was dropped on 121 at first slip by Hameed off Imran Farhat's gentle wrist spin, the 19th chance spilled by Pakistan in the series.
One run later he won a reprieve from third umpire Steve Davis, who over-ruled an lbw decision awarded by Tony Hill to off-spinner Saeed Ajmal when a television replay showed the ball would have missed leg-stump.