Lawrie Wilson scored an injury-time winner for Stevenage to down Oldham and take them to within two points of the play-off places.
Oldham had a chance in the first half when Tom Adeyemi received Boro keeper Chris Day's poor goal-kick but lobbed over from 30 yards.
After the break Craig Reid was denied by onrushing Latics keeper Alex Cisak.
But Cisak was beaten when Wilson met Darius Charles's right-wing cross with a diving header.
VIEWS FROM THE DRESSING ROOM
Stevenage manager Gary Smith told BBC Three Counties Radio:
"Somehow we had to get a result. It didn't matter how the result came. If we'd have won it 4-0 or 5-0 of course we'd have felt a lot better about it.
"We win the game in the last minute and it certainly feels euphoric because of the way the goal came about and the lateness of it.
"But the three points are very much the most important thing at this stage to try and take advantage of those games in hand."
Live Text Commentary
Full Time The referee ends the match.90:00 +3:17
Filipe Morais decides to take a short corner, clearance by Mark Roberts.90:00 +0:46
Assist on the goal came from Darius Charles.90:00 +0:46 Goal scored
Goal! - Lawrie Wilson - Stevenage 1 - 0 Oldham Lawrie Wilson finds the net with a headed goal from close in. Stevenage 1-0 Oldham.89:10
Michael Bostwick has an effort at goal from outside the area which goes wide left of the target.86:20
Close range headed effort by Tom Adeyemi misses to the right of the goal.84:56
Corner taken by Joel Byrom, clearance made by James Tarkowski. Corner taken left-footed by Joel Byrom, clearance made by Matt Smith.84:33
Filipe Morais takes a shot. Save made by Chris Day.84:00
Scott Laird has an effort at goal from just inside the box that misses to the right of the goal.82:42
Matt Smith gives away a free kick for an unfair challenge on Jon Ashton. Chris Day takes the free kick.81:21 Substitution
Substitution Matt Smith on for Reuben Reid.80:09 Substitution
Substitution (Stevenage) makes a substitution, with Jennison Myrie-Williams coming on for Craig Reid.77:05
Free kick awarded for an unfair challenge on Chris Taylor by Lawrie Wilson. The free kick is swung in right-footed by Filipe Morais.74:37
Foul by Scott Laird on Youssouf M'changama, free kick awarded. Alex Cisak restarts play with the free kick.70:32
Free kick awarded for a foul by Darius Charles on Filipe Morais. Free kick crossed by Filipe Morais, clearance made by Jon Ashton.68:11 Substitution
Substitution Jamaal Lascelles is brought on as a substitute for Luke Freeman.62:24 Substitution
Substitution Jordan Slew goes off and Patrick Agyemang comes on.59:25
Unfair challenge on Youssouf M'changama by Michael Bostwick results in a free kick. Indirect free kick taken by James Tarkowski.57:50
Free kick crossed by Filipe Morais, Darius Charles makes a clearance. Unfair challenge on Jordan Slew by Kieran Lee results in a free kick. Chris Day takes the free kick.57:50 Booking
Booking Booking for Joel Byrom for unsporting behaviour.
Joel Byrom challenges Chris Taylor unfairly and gives away a free kick.52:44
Free kick awarded for a foul by Chris Taylor on Luke Freeman. Shot comes in from Michael Bostwick from the free kick, save made by Alex Cisak.51:52
Effort from the edge of the box by Shefki Kuqi goes wide of the right-hand upright.51:37
Craig Reid takes a shot. Save made by Alex Cisak.48:05
Kieran Lee fouled by Scott Laird, the ref awards a free kick. Free kick taken by James Tarkowski.46:42
Filipe Morais produces a left-footed shot from outside the penalty area and misses left.45:33
Shot from deep inside the area by Tom Adeyemi clears the crossbar.45:01
The referee gets the second half underway.45:00 +1:03 Half time
Half Time The ref blows to signal half-time.44:41
Joel Byrom takes a inswinging corner from the right by-line played to the near post, Shefki Kuqi manages to make a clearance.42:44
Shot from just outside the box by Michael Bostwick misses to the right of the goal.40:09
Jordan Slew gives away a free kick for an unfair challenge on Jean Yves Mvoto. Free kick taken by Alex Cisak.38:30
Craig Reid has an effort at goal from outside the area which misses left.38:05
Free kick awarded for an unfair challenge on Jordan Slew by Tom Adeyemi. Darius Charles takes the indirect free kick.32:04
Jordan Slew takes a shot. Save by Alex Cisak.29:21
Free kick awarded for a foul by Jon Ashton on Shefki Kuqi. Youssouf M'changama shoots direct from the free kick.28:30
Effort on goal by Jordan Slew from just inside the penalty area goes over the target.26:14
Unfair challenge on Reuben Reid by Mark Roberts results in a free kick. Filipe Morais produces a shot on goal direct from the free kick, Jon Ashton gets a block in.25:37
The official flags Michael Bostwick offside. James Tarkowski takes the indirect free kick.25:10
Luke Freeman takes a shot. Save by Alex Cisak.22:56
Shot from just outside the box by Tom Adeyemi goes over the target.20:24
Free kick awarded for an unfair challenge on James Tarkowski by Jordan Slew. Filipe Morais takes the free kick.19:20
Shot from just outside the box by Shefki Kuqi misses to the right of the goal.16:26
Reuben Reid challenges Scott Laird unfairly and gives away a free kick. Chris Day takes the indirect free kick.15:49
Free kick awarded for a foul by Darius Charles on Kieran Lee. Filipe Morais crosses the ball in from the free kick, Scott Laird manages to make a clearance.12:44
Filipe Morais crosses the ball in from the free kick.12:44 Substitution
Substitution Zander Diamond leaves the field to be replaced by James Tarkowski.12:44
Scott Laird challenges Shefki Kuqi unfairly and gives away a free kick.11:10
Outswinging corner taken by Joel Byrom, Jean Yves Mvoto makes a clearance.10:19
Michael Bostwick has a shot on goal from outside the box which misses left.6:36
Youssouf M'changama takes a shot.2:59
Shefki Kuqi fouled by Joel Byrom, the ref awards a free kick. Free kick taken by Zander Diamond.2:08
Free kick awarded for an unfair challenge on Craig Reid by Youssouf M'changama. Chris Day takes the free kick.0:00
The game begins.
Live data and text provided by our data suppliers