Jeff Goulding came off the bench to secure a last-gasp win over Oxford and keep Aldershot's survival hopes alive.
The Shots had been in control through Paul McCallum's early strike and Craig Reid's penalty just after half-time.
But a Scott Davis free-kick reduced the arrears and Jon-Paul Pitmann levelled things five minutes from time despite a red card for Michael Raynes.
However, substitute Goulding headed in Danny Rose's free-kick two minutes later to secure a first win in seven.
The Hampshire side are now two points from safety and have a game in hand on six of the seven sides directly above them.
VIEW FROM THE DRESSING ROOM
Aldershot Town manager Andy Scott told BBC Surrey:
"We made it hard for ourselves but the way we responded was tremendous.
"I think we deserved to win the game and it's the first time we've scored three times since I've been here.
"The set-piece from Adam Mekki was a fantastic delivery and Jeff (Goulding) has got on the end of it and we deserved to win the game and it keeps us in the hunt.
"The crowd played a big part today because going 2-0 up and then 2-2, there could have been nerves and they responded and we had to for them."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee brings the game to a close.90:00 +3:38
Free kick awarded for a foul by Scott Davies on Danny Rose. Danny Rose takes the free kick.89:52
Jeff Goulding is penalised for handball and concedes a free kick. Direct free kick taken by Scott Davies.88:18 Substitution
Substitution Jordan Roberts joins the action as a substitute, replacing Craig Reid.86:06
Assist on the goal came from Danny Rose.86:06 Goal scored
Goal! - Jeff Goulding - Aldershot 3 - 2 Oxford Jeff Goulding scores a headed goal from deep inside the penalty area. Aldershot 3-2 Oxford Utd.84:11
Tom Craddock provided the assist for the goal.84:11 Goal scored
Goal! - Jon-Paul Pittman - Aldershot 2 - 2 Oxford Jon-Paul Pittman scores a goal from the edge of the penalty area to the top left corner of the goal. Aldershot 2-2 Oxford Utd.79:02
Corner from the left by-line taken by Scott Davies, clearance by Danny Rose.78:32
Sonny Bradley challenges James Constable unfairly and gives away a free kick. Free kick crossed by Liam Davis, clearance by Peter Vincenti.78:12
The assistant referee flags for offside against Craig Reid. Luke McCormick restarts play with the free kick.77:02
Free kick taken by Anthony Tonkin.77:02 Dismissal
Dismissal Michael Raynes shown a red card.76:49
Free kick awarded for an unfair challenge on Peter Vincenti by Michael Raynes.75:40
Free kick awarded for an unfair challenge on Asa Hall by Scott Davies. Adam Mekki takes the free kick.74:45
The official flags Jon-Paul Pittman offside. Ross Worner restarts play with the free kick.66:48
Unfair challenge on Asa Hall by Jon-Paul Pittman results in a free kick. Direct free kick taken by Anthony Tonkin.65:38
Assist on the goal came from Jon-Paul Pittman.65:38 Goal scored
Goal! - Scott Davies - Aldershot 2 - 1 Oxford Scott Davies scores a goal direct from the free kick from just outside the area to the bottom right corner of the goal. Aldershot 2-1 Oxford Utd.64:01
Sonny Bradley concedes a free kick for a foul on Jon-Paul Pittman.
Substitution Paul McCallum leaves the field to be replaced by Jeff Goulding.61:25 Substitution
Substitution (Oxford Utd) makes a substitution, with Jon-Paul Pittman coming on for Luke O'Brien.61:05
The assistant referee flags for offside against Asa Hall. Free kick taken by Luke McCormick.59:43
Luke O'Brien gives away a free kick for an unfair challenge on Adam Mekki. Direct free kick taken by Ross Worner.58:02
Unfair challenge on Damian Batt by Peter Vincenti results in a free kick. Luke McCormick takes the direct free kick.54:25
Inswinging corner taken from the right by-line by Danny Rose, Michael Raynes makes a clearance.53:16
Foul by Luke O'Brien on Asa Hall, free kick awarded. Ross Worner takes the direct free kick.51:31
Direct free kick taken by Anthony Tonkin.51:31 Booking
Booking The referee cautions Michael Raynes for unsporting behaviour.50:29
Foul by Michael Raynes on Craig Reid, free kick awarded.49:15 Booking
Booking Craig Reid goes into the referee's book for unsporting behaviour.48:30
The assist for the goal came from Adam Mekki.48:30 Goal scored
Goal! - Craig Reid - Aldershot 2 - 0 Oxford Penalty taken right-footed by Craig Reid and scored. Aldershot 2-0 Oxford Utd.46:57
Penalty awarded for an unfair challenge on Adam Mekki by Liam Davis.45:01
The referee blows his whistle to start the second half.45:01 Substitution
Substitution James Constable comes on in place of Simon Heslop.45:00 +6:08 Half time
Half Time It is the end of the first-half.45:00 +2:29
Free kick awarded for an unfair challenge on Adam Mekki by Liam Davis. Ben Herd takes the free kick.42:53
Headed effort from deep inside the penalty area by Alfie Potter goes harmlessly over the crossbar.42:25
Terrell Forbes challenges Alfie Potter unfairly and gives away a free kick. Jake Wright restarts play with the free kick.39:52
Effort from 12 yards by Asa Hall. Blocked by Michael Raynes. Corner taken by Danny Rose from the right by-line, save by Luke McCormick.39:11
Unfair challenge on Adam Mekki by Luke O'Brien results in a free kick. Direct free kick taken by Ben Herd.36:58
Asa Hall challenges Andrew Whing unfairly and gives away a free kick. Direct free kick taken by Luke McCormick.34:07
Adam Mekki takes the inswinging corner, Luke McCormick makes a save.33:31
Adam Mekki takes the inswinging corner, Jake Wright manages to make a clearance.31:31
The assistant referee flags for offside against Tom Craddock. Free kick taken by Ross Worner.26:35
Scott Davies takes the inswinging corner, clearance by Peter Vincenti.24:37
The offside flag is raised against Tom Craddock. Ross Worner takes the free kick.22:44
Peter Vincenti takes a shot. Luke McCormick makes a save. Corner from the left by-line taken by Adam Mekki, save by Luke McCormick.21:52
The assistant referee flags for offside against Tom Craddock. Indirect free kick taken by Ross Worner.19:48
Paul McCallum fouled by Michael Raynes, the ref awards a free kick. Direct free kick taken by Anthony Tonkin.17:51
Corner taken by Scott Davies from the right by-line to the near post, Peter Vincenti manages to make a clearance.17:51 Substitution
Substitution Adam Mekki is brought on as a substitute for Aaron Morris.12:38
Assist by Craig Reid.12:38 Goal scored
Goal! - Paul McCallum - Aldershot 1 - 0 Oxford A goal is scored by Paul McCallum from deep inside the penalty box to the bottom left corner of the goal. Aldershot 1-0 Oxford Utd.10:51
Tom Craddock fouled by Peter Vincenti, the ref awards a free kick. Direct free kick taken by Jake Wright.9:39
Tom Craddock produces a right-footed shot from just outside the box that misses to the right of the goal.8:03 Substitution
Substitution Luke O'Brien comes on in place of Sean Rigg.3:49
Free kick awarded for an unfair challenge on Alfie Potter by Sonny Bradley. Free kick taken by Scott Davies.1:19
The referee blows for offside against Alfie Potter. Ross Worner takes the free kick.0:00
The match gets underway.
Live data and text provided by our data suppliers