England's Liam Plunkett smashed the last ball of the match for six to earn his team a dramatic tie with Sri Lanka in the first one-day international in Nottingham on Tuesday.
The hosts, chasing 287 for victory, collapsed to 82 for six before Jos Buttler made 93 and Chris Woakes 95 not out to give England a chance of winning the game at TrentBridge.
They needed 10 off the last two balls and Woakes scrambled three before Plunkett launched Nuwan Pradeep over long-off to tie the match.
"It was nice to get that one out. Woakesey and Jos put us in a great position and we were backing ourselves to take it as deep as possible," Plunkett told the BBC.
"It just shows the depth we have got. It's good for the team - you know you can carry on all the way through an innings."
Sri Lanka, put into bat, were indebted to a good innings of 73 by their captain Angelo Mathews as they posted a decent total of 286 for nine.
Seekkuge Prasanna also struck a quickfire 59 off 28 deliveries, including four sixes and eight fours.
England collapsed at the start of their reply, losing Jason Roy, Alex Hales, Joe Root and Jonny Bairstow with only 30 runs on the board.
Captain Eoin Morgan steadied the ship with 43 but his team were still in deep trouble when Woakes and Buttler came together.
They added 138 for the seventh wicket and Plunkett's unbeaten 22 off 11 deliveries carried England to only their eighth tie in 665 one-day internationals.
"I thought we had the game in the bag for most of the overs. Unfortunately the yorker fell just off line and went for a six," Sri Lanka captain Mathews said.
"We fell short by 15, 20 runs. It was a brilliant wicket to bat on but we had to be satisfied with 286. We just kept losing wickets at crucial times."
England won the recent test series between the teams 2-0. The next game in the five-match one-day series is in Birmingham on Friday.