Tim Bresnan hit the winning run from the third ball of the final over as England chased down a target of 295 for a four-wicket victory over Pakistan in the second match of the NatWest Series.
Andrew Strauss' 126 looked to have put the hosts on course for a comfortable triumph at Headingley before a collapse left them still needing 31 from the final four overs.
Michael Yardy (13no) and Bresnan (10no) each struck two crucial boundaries to ensure England sneaked across the line and now lead the five-match series 2-0.
Pakistan opener Kamran Akmal had earlier hammered 74 off 72 balls as the tourists put their recent woes aside to pile up 294-8.
Given the one-sided nature of recent meetings between these two sides, Pakistan skipper Shahid Afridi's decision to bat first in fresh conditions at 10.15am appeared a brave one.
But it was fully justified by Akmal, whose early assault laid waste to both Bresnan (1-53) and Stuart Broad's figures, the accurate James Anderson (1-36) being the only member of England's seam attack to offer any control.
Akmal and Mohammad Hafeez put on 122 for the first wicket and, such was their dominance on a true batting surface, it came as a surprise when Akmal, having raced to his seventh ODI half-century at exactly a run-a-ball, was lbw to medium pacer Paul Collingwood (1-26).
Hafeez (43) soon followed, bowled by off-spinner Graeme Swann (1-43), but Pakistan's misfiring middle order finally came to the party - with contributions from Mohammad Yousuf (46), Asad Shafiq (50), Umar Akmal (28) and Fawad Alam (20no) ensuring the early momentum was not wasted.
Shafiq reached a maiden 50 in just his second appearance at this level before being one of four victims for Broad, who came back well from his early mauling to finish with 4-81.
Faced with such a stiff target, Steve Davies gave England a flying start with five boundaries in his 26.
Shoaib Akhtar (1-49) had Davies caught behind in the seventh over but second-wicket pair Strauss and Jonathan Trott broke the back of the run chase with a measured stand of 146 from 155 deliveries.
Strauss was given two lives, firstly when Mohammad Irfan shelled a regulation catch at short fine-leg off Shoaib and later when umpire Billy Doctrove failed to spot a glove behind from Umar Gul's bowling.
The England captain made the most of those reprieves to bring up his 50 from 65 balls, two fewer than Trott required to reach the same landmark.
But Trott's departure for 53, run out by Shoaib's direct hit, was the start of a collapse that saw the home side pegged back from 189-1 to 260-5.
Strauss advanced to his fifth ODI hundred, including nine fours and a six, but he was trapped lbw by Saeed Ajmal (2-52) as the pressure - and the required-rate - began to mount.
Collingwood (19), Eoin Morgan (16) and Ravi Bopara (16) all came-and-went and the contest was still in the balance when - crucially as it turned out - England took the batting powerplay at the start of the 45th over.
With 13 needed from the final 12 deliveries, Bopara opened the penultimate over, bowled by Ajmal, by skying a catch to Hafeez.
Yorkshireman Bresnan, however, strode out on his home patch and smashed his first ball for four through the covers, then pushed a single to put himself back on strike with six needed from the final six balls.
That became six from five when Gul (1-59) produced a dot to start the last over but then bowled a wide and Bresnan heaved the next over the wicketkeeper's head via the edge for a fortuitous four that brought the scores level.
A scampered single to mid-off completed England's win, although even then a direct hit would have done for Bresnan.
The series continues at the Oval on Friday where England can clinch the series - and a clean sweep over Pakistan in all three formats - with another victory.