Kenwyne Jones' towering late header ensured Stoke progressed to the knockout phase of the Europa League.
Dynamo Kiev dominated the first half and took a deserved lead when Matthew Upson steered Olexandr Aliyev's low shot into his own net.
But the Potters raised their game and were rewarded when Jones powered in Jermaine Pennant's pinpoint cross.
A stunning stoppage-time save by Asmir Begovic ensured Stoke only need a draw at Besiktas to top Group E.
The result had looked far from certain as Stoke, who become the first English club to progress to the last 32, were outplayed for much of the first half.
They struggled to keep up with Dynamo's quick, incisive passing and the home side were cut open several times.
Aliyev was the brightest of Dynamo's impressive forward line, firing a couple of dangerous shots at Begovic's goal, with Andriy Yarmolenko also coming close in the early stages.
DID YOU KNOW?
This is the first time Stoke have gone beyond the first round in European competition. They were previously knocked out by Kaiserslautern in 1972-73 and Ajax in 1974-75
So it was not unexpected when the Ukrainian side took a deserved lead - and it came courtesy of an own goal by Stoke skipper Upson.
Yarmolenko drove towards the backpedalling Stoke defence before releasing Aliyev, whose powerful low drive was steered into his own net by Upson, despite the best efforts of Begovic to keep it out.
The goal had been coming, mainly because of Stoke's inability to contain the inventive Aliyev.
Stoke continued to labour after going behind and Shevchenko should have made it 2-0 before the break, but the former Chelsea striker could only slice his left-footed shot against the outside of the post after Aliyev's piercing through ball.
Tony Pulis's side were brighter in the second half and Wilson Palacios latched onto Rory Delap's ball over the defence before forcing goalkeeper Olexandr Shovkovskiy to smother.
Moments later Pennant saw his drilled shot cleared off the line by Yevhen Khacheridi, as the visitors were suddenly unable to deal with Stoke's sustained assault.
Stoke's equaliser eventually came courtesy of Jones, who evaded his marker to head home Pennant's cross from the right, and substitute Peter Crouch was swiftly ordered to put his tracksuit back on.
The equaliser gave way to a nervy end for Stoke, who have Begovic to thank for a magnificent fingertip save from Yarmolenko in the dying seconds.
The striker's stinging effort was superbly tipped around the post by the Bosnian stopper, with the shot seeming destined for the back of the net.
- 01 Begovic
- 03 Higginbotham
- 04 Huth Booked
- 20 Upson
- 30 Shotton
- 15 Diao (Fuller - 70' )
- 16 Pennant (Whitehead - 88' )
- 24 Delap
- 40 Palacios
- 09 Jones (Walters - 84' )
- 33 Jerome
- 27 Nash
- 17 Shawcross
- 12 Wilson
- 18 Whitehead
- 10 Fuller
- 19 Walters
- 25 Crouch
- 01 Shovkovskiy
- 02 Danilo Silva
- 03 Betao
- 34 Khacheridi Booked
- 05 Vukojevic
- 08 Aliev
- 20 Gusev
- 37 Yussuf (Ninkovic - 85' )
- 07 Shevchenko (Leandro Almeida - 73' )
- 09 Yarmolenko Booked
- 11 Brown
- 35 Koval
- 44 Leandro Almeida
- 25 Haruna
- 36 Ninkovic
- 77 Correa
- 10 Milevskiy
- 26 Adi