Notts County bowed out of the FA Trophy as Wrexham's James Jones snatched a late win at Meadow Lane.
The Magpies had taken the lead in the first half when Connell Rawlinson glanced in Adam Chicksen's cross after Matt Palmer had been denied a penalty.
But Jones then saw a cross deflected into the path of Dan Jarvis before half-time and the midfielder struck a terrific effort that flew past Sam Slocombe.
After the break, Wrexham carried much more threat going forwards with Liam McAlinden taking it upon himself to try to find a second goal but none of his three efforts troubled Slocombe.
With time ticking away and the prospect of penalties, Ed Francis came desperately close to snatching the win when his thunderous drive clattered the bar.
But moments later it was Wrexham who sealed their place in the semi-finals when Jones surged into the box and slipped his effort past Slocombe.
Sam Slocombe: Kicking was okay but could do very little about both goals as both were excellent finishes. Made a superb save in the dying stages to stop it being three. 6
Dion Kelly-Evans: Up and down the right-hand flank all night. Got into some good attacking positions and barked into the tackles like a dog on postman watch. 7
Connell Rawlinson: Came up with a big performance against his hometown team as personified with a terrific header to give Notts the lead. 8
Alex Lacey: Very measured in everything he did and alongside Rawlinson and Chicksen didn't give up too many opportunities. A solid display. 7
Adam Chicksen: Hit a peach of a cross that created the opener for Rawlinson, but couldn't clear the cross from Jones that led to Jarvis' equaliser. Still had a fine game. 7
Joel Taylor: Sometimes gets beaten too far easily by wide players which is an area he can definitely improve on. It lets him down. Was booked in the second half. 5
Ed Francis: Played with a cool head in the middle of the pitch and his range of passing was very good. Can be a bit firmer in the tackle mind but overall was excellent. Came close to a winner. 8
Matt Palmer: Showed tremendous vision at times with some beautiful passes and should have had a nailed on spot-kick. The ref had a nightmare. 8
Frank Vincent: Works so well in the press and ratted around every time Wrexham tried to play out from the back. Tremendous energy. 6
Aaron Nemane: The former Manchester City winger was thrust up front and had an excellent game. Carried pace, tricks and the only thing missing was a goal. 7
Kairo Mitchell: Touch let him down once or twice, but also showed moments of quality. He forced Dibble into a good save in the first half. 6