Kidderminster Harriers booked their place in the third round of the FA Trophy the hard way after throwing away a two-goal lead at Aggborough.
Harriers looked comfortably on course when an early second-half Darryl Knights goal doubled the early lead earned by Robbie Matthews.
Lewes then hit back to astonishingly level with two goals in five minutes from Aaron Hopkinson and Louis Pople.
But Gavin Caines came up with the goods for an injury-time winner.
Caines drilled home from 12 yards just when visiting keeper Rikki Banks appeared to have saved his side with a double block from Aaron Farrell and Knights.
Harriers caretaker boss John Finnigan told BBC Hereford and Worcester: "We had to work hard for it in the end, it was a bit too easy and a bit of sloppiness crept in.
"The boy were coasting really, and when they are playing well they have to keep doing the right things.
"Overall we deserved the win and I told the players that, but we should have won lot more comfortably than we did."
Harriers could now face Worcester City if their now managerless local rivals win next week's replay with Carshalton Athletic, following Monday night's 1-1 draw at St George's Lane.
It could have been Finnigan's final game in charge as caretaker boss as Harriers, ninth in the Blue Square Premier, expect to appoint Mark Yates' long-term successor on Wednesday.
Bookmark with:
What are these?