England crushed Pakistan by 167 runs on Tuesday to win the third Test and the series after a moment of madness from Mohammad Yousuf and one of magic from Monty Panesar.
Pakistan, set 323 to win on the final day, were bowled out for 155 halfway through the afternoon session, giving England their first home win over the tourists since 1982.
Yousuf, the hero of the first innings after he scored 192 out of a 363-run stand with Younis Khan, ran himself out in the morning for just eight to give England the upper hand.
Panesar then produced a classic left-arm spinner's delivery, pitching on middle and clipping the top of the off stump, to get rid of Younis shortly after lunch to expose Pakistan's lower order.
Younis, with 173 to his name in his first visit and a fine player of spin, trudged back to the pavilion after making 41, knowing that the game was lost.
Panesar, who also had Inzamam-ul-Haq stumped to end the match, took three for 39 while team mate Sajid Mahmood, who used to support Pakistan as a boy, got four for 22.
Yousuf and Younis's dismissals sealed a fascinating game which had sparked into life on Monday after both sides had topped 500 in their first innings.
England had begun Tuesday as "slight favourites", according to England captain Andrew Strauss. They had the runs in the bank. Pakistan, meanwhile, had to bat last on a Headingley wicket which had begun to offer signs of variable bounce the day before.
A draw seemed unlikely -- the last draw at the venue came 10 years and eight tests ago -- and it seemed unlikelier still when Salman Butt announced Pakistan's positive intentions with four fours in two overs off Matthew Hoggard.
Those, though, would be his only scoring shots before he attempted another drive which ended up in Marcus Trescothick's hands at first slip.
From 21 for one, they slumped to 80 for five as lunch approached.
Panesar first got into the act by getting rid of Umar Taufeeq for 11 in the second over of his spell from the Football Stand End. Taufeeq swept and the ball went bat-pad straight to Alastair Cook at silly mid-off.
That brought Yousuf out to join Younis. If a miracle was to occur, it would come from them.
Yousuf, though, got away with a thick nick off Panesar before setting off for a single after Younis dabbed down a delivery towards gully while facing fast bowler Mahmood.
Paul Collingwood scooped up the ball and dived towards the stumps to leave Yousuf a foot short with a direct hit. This time Yousuf and Younis had managed to put on just 16.
England knew it was a critical breakthrough as they mobbed Collingwood but Mahmood, whose parents both come from Pakistan, made sure the pre-lunch session continued with two wickets in three balls.
Faisal Iqbal (11) flicked at a leg-side delivery and wicketkeeper Chris Read, back in the England side after a two-year exile, tumbled low to his left to take a difficult chance. Kamran Akmal's edge, for a two-ball duck, also flew to Read as Mahmood squared the batsman.
Mahmood would have as dramatic an influence in the afternoon, with two wickets in his first over back after lunch, but only after Panesar had got rid of Younis. He lured the batsman forward with the perfect ball and left him looking back in surprise at the missing bails. That made it 112 for six and the game was up.
Inzamam, who had been forced to come in at number seven rather than his customary five after missing most of Monday with a chest injury, was left stranded with the tail. His frustration was complete when, having made 37, he advanced down the wicket to Panesar, swung and was stumped by Read before he had time to turn around.