Bury won away from home for the first time this season in League One, beating Oldham in the Greater Manchester derby.
The visitors went ahead when Latics' Cliff Byrne headed Matt Doherty's cross against James Tarkowski, who could only watch the ball sail into his own net.
Steven Schumacher's penalty, after Tarkowski fouled David Worrall in the area, sealed a crucial three points for the struggling Shakers.
Robbie Simpson's stoppage-time header was a late consolation for Oldham.
It was a night of huge frustration for the Latics, who had lost only one of their previous seven matches but were second best to a side that had previously been without an away win in League One since 21 April.
Rare away glory for Bury
Bury's last away win in League One was a 4-2 success against Notts County on 21 April.
Of the 11 that started on that day at Meadow Lane, only three began for the Shakers at Boundary Park (Joe Skarz, Steve Schumacher and David Worrall).
Oldham were wasteful in possession in the early stages, while the Shakers looked more confident on the slippery Boundary Park surface and it was no surprise when Kevin Blackwell's men took the lead, albeit in bizarre circumstances.
The impressive Doherty made a surging run from right-back and, while Byrne was able to meet the Dubliner's cross, his clearing header bounced off fellow defender Tarkowski and past a helpless Dean Bouzanis.
Robbie Simpson's tame effort from the edge of the box was all Oldham could muster from a forgettable first 45 minutes for the home side.
Captain Dean Furman was introduced just before half-time and the hosts improved significantly after the break.
Simpson's lobbed effort from 25 yards landed on the roof of the net, while an unmarked Jonathan Grounds nodded wide from a corner.
And Bury keeper Trevor Carson was forced into his first meaningful action of the evening to keep out Jose Baxter's drilled volley.
The visitors held firm against a barrage of set-pieces and made the game safe with four minutes left.
Referee Graham Salisbury, having turned down an earlier penalty appeal from Furman, pointed to the spot after Tarkowski was caught in a tangle of legs with Worrall. Bury skipper Schumacher lashed the resulting penalty high past Bouzanis to double the lead.
Simpson's late header from a Lee Croft free-kick frayed a few Bury nerves in injury time, but the League One strugglers held on for the win and extended their unbeaten run in all competitions to four matches.
VIEW FROM THE DRESSING ROOM
Oldham Athletic manager Paul Dickov told BBC Radio Manchester:
"They started the game brighter than us, they played with more energy and they played the better football in the first half.
"The standards we've set, with or without the ball, weren't there, especially in the first half.
"The boys had a go in the second half, which is the minimum we should ask from them. Two massive decisions have cost us.
"How the penalty for Dean Furman is not given, I'll never know. He's had his legs wiped from under him, right in front of the referee."
Bury manager Kevin Blackwell told BBC Radio Manchester:
"It's always nice to win a local derby.
"Oldham put us under pressure towards the end, but in the first half and in short spells of the second half, we looked a good side.
"Knowing Paul Dickov's side, they're always at you and they never give up. I wouldn't expect a team to lie back and die, and sure enough they didn't.
"Sometimes you have to fight and scrap, and sometimes you can play like Barcelona. We did a bit of Barcelona and a bit of Bognor Regis."
Live Text Commentary
Full Time The referee blows his whistle to end the game.90:00 +4:40
Free kick awarded for a foul by Dean Furman on Troy Hewitt. Direct free kick taken by Trevor Carson.90:00 +3:56
Reece Wabara sends in a cross.90:00 +2:08
The assist for the goal came from Lee Croft.90:00 +2:08 Goal scored
Goal! - Robbie Simpson - Oldham 1 - 2 Bury Robbie Simpson scores a goal from just outside the box to the top right corner of the goal. Oldham 1-2 Bury.90:00 +1:50
Adam Lockwood gives away a free kick for an unfair challenge on Matt Smith. The free kick is swung in right-footed by Lee Croft,90:00 +0:37
Robbie Simpson has an effort at goal from outside the area which goes wide right of the goal.89:40 Booking
Booking The referee shows Troy Hewitt a yellow card.88:37
Reece Wabara has a shot on goal from outside the area which misses right.87:16
Effort from the edge of the box by Dean Furman goes wide of the left-hand post.86:55
Unfair challenge on Robbie Simpson by David Worrall results in a free kick. Free kick taken by Dean Bouzanis.86:32 Booking
Booking Trevor Carson goes into the book for unsporting behaviour.85:25 Goal scored
Goal! - Steven Schumacher - Oldham 0 - 2 Bury Power penalty scored by Steven Schumacher. Oldham 0-2 Bury.84:21
James Tarkowski concedes a Penalty for a foul on David Worrall.83:49
Matt Derbyshire takes a shot. Save by Trevor Carson.83:00
The ball is swung over by Chris Sutherland, James Tarkowski takes a shot. Mark Hughes gets a block in. Outswinging corner taken from the right by-line by Lee Croft, David Worrall manages to make a clearance.81:56
Lee Croft delivers the ball from the free kick right-footed from left wing. Corner from right by-line taken by Lee Croft.81:56 Booking
Booking Matt Doherty is cautioned.81:44
Foul by Steven Schumacher on Dean Furman, free kick awarded.79:14
David Worrall takes a shot. Dean Furman gets a block in.
Zac Thompson takes a shot from deep inside the box clearing the bar. Free kick awarded for a foul by Matt Smith on Matt Doherty. Direct free kick taken by Trevor Carson.77:51
Free kick awarded for a foul by James Tarkowski on Andy Bishop. Steven Schumacher takes the direct free kick.77:10
Reece Wabara sends in a cross, Matt Smith takes a shot. Save made by Trevor Carson.76:53
Lee Croft takes the inswinging corner, Mark Hughes manages to make a clearance.76:24
The ball is crossed by Jonathan Grounds, Zac Thompson manages to make a clearance. Corner taken left-footed by Lee Croft to the near post, Andy Bishop manages to make a clearance.75:21
Free kick awarded for a foul by Mark Hughes on Matt Smith. The free kick is swung in right-footed by Lee Croft. Inswinging corner taken by Lee Croft from the right by-line, Troy Hewitt manages to make a clearance.75:06
Free kick awarded for an unfair challenge on Cliff Byrne by Andy Bishop. Dean Bouzanis takes the direct free kick.74:11 Substitution
Substitution Andy Bishop on for Tom Hopper.73:09
Lee Croft takes the direct free kick. Inswinging corner taken by Lee Croft, Trevor Carson makes a save.73:09 Booking
Booking Steven Schumacher goes into the book.71:33
Free kick awarded for a foul by Robbie Simpson on Zac Thompson. Steven Schumacher shoots direct from the free kick. Free kick awarded for an unfair challenge on Robbie Simpson by Tom Hopper. Dean Bouzanis takes the direct free kick. Steven Schumacher concedes a free kick for a foul on Robbie Simpson.70:14
Free kick crossed by Steven Schumacher, clearance by Dean Furman.70:14 Substitution
Substitution Matt Smith is brought on as a substitute for James Wesolowski.70:14 Substitution
Substitution Chris Sutherland joins the action as a substitute, replacing Jose Baxter.70:14
Free kick awarded for a foul by Jonathan Grounds on Dominic Poleon.68:46
Reece Wabara crosses the ball, Jose Baxter takes a shot. Save by Trevor Carson.66:40
Tom Hopper concedes a free kick for a foul on James Tarkowski. Dean Bouzanis takes the direct free kick.65:20
Mark Hughes challenges Matt Derbyshire unfairly and gives away a free kick. Free kick crossed by Jose Baxter, Steven Schumacher manages to make a clearance.64:08
Free kick awarded for a foul by Zac Thompson on Dean Furman. James Tarkowski takes the free kick.63:33
Reece Wabara crosses the ball.62:34
Reece Wabara sends in a cross, clearance by Mark Hughes.61:05
Lee Croft delivers the ball. Outswinging corner taken right-footed by Lee Croft from the right by-line, Headed effort from deep inside the area by Jonathan Grounds misses to the left of the goal.59:49
The official flags Tom Hopper offside. Free kick taken by Dean Bouzanis.57:27
The ball is sent over by Dominic Poleon. Outswinging corner taken by Steven Schumacher from the right by-line played to the near post, clearance by Matt Derbyshire.56:03
Shot from just outside the area by Robbie Simpson goes over the bar.55:23
Effort from the edge of the area by James Wesolowski goes wide of the right-hand post.54:24
The ball is crossed by David Worrall, James Tarkowski makes a clearance.54:09
Jose Baxter gives away a free kick for an unfair challenge on Matt Doherty. Direct free kick taken by Matt Doherty.53:34 Substitution
Substitution (Bury) makes a substitution, with Troy Hewitt coming on for David Healy.51:49
Pass corner from left by-line taken by Steven Schumacher to far post.47:03
Inswinging corner taken by Lee Croft.45:01
The second half kicks off.45:00 +2:40 Half time
Half Time The whistle is blown to end the first half.45:00 +1:45
The ball is delivered by David Worrall, Lee Croft makes a clearance. Outswinging corner taken right-footed by Steven Schumacher from the right by-line. Free kick awarded for a foul by Tom Hopper on Dean Bouzanis. Dean Bouzanis restarts play with the free kick.45:00 +1:00
The offside flag is raised against Robbie Simpson. Trevor Carson takes the indirect free kick.45:00 +0:44
The referee gives a free kick against David Healy for handball. Dean Bouzanis restarts play with the free kick.44:13
The referee gives a free kick against Matt Doherty for handball. Jose Baxter crosses the ball from the free kick right-footed from left channel, clearance by Tom Hopper.42:53
Free kick awarded for an unfair challenge on Matt Derbyshire by Joe Skarz. The free kick is delivered right-footed by Jose Baxter from right wing, clearance by Steven Schumacher.41:32
Robbie Simpson takes a shot. Save made by Trevor Carson.40:31
The ball is sent over by Reece Wabara, Joe Skarz gets a block in.39:48
Tom Hopper gives away a free kick for an unfair challenge on Jose Baxter. James Tarkowski takes the direct free kick.37:37
Matt Doherty takes a shot. Save by Dean Bouzanis.36:48 Substitution
Substitution Cristian Montano leaves the field to be replaced by Dean Furman.35:09
David Worrall takes a shot. James Tarkowski gets a block in.33:23 Goal scored
Goal! - James Tarkowski - Oldham 0 - 1 Bury Headed own goal by James Tarkowski. Oldham 0-1 Bury.32:38
Free kick awarded for an unfair challenge on David Healy by James Tarkowski. Joe Skarz takes the direct free kick. The ball is sent over by Matt Doherty.29:29
The referee blows for offside. Indirect free kick taken by Dean Bouzanis.28:35
The ball is crossed by Matt Doherty. Outswinging corner taken by Steven Schumacher, clearance by Jonathan Grounds.27:21
The ball is swung over by Reece Wabara, Matt Doherty manages to make a clearance.25:26
Jose Baxter fouled by Dominic Poleon, the ref awards a free kick. Direct free kick taken by Dean Bouzanis.24:22
Outswinging corner taken right-footed by Steven Schumacher from the right by-line.23:36
Tom Hopper challenges Lee Croft unfairly and gives away a free kick. Cliff Byrne takes the free kick.18:52
Free kick awarded for a foul by Jonathan Grounds on Dominic Poleon. Free kick crossed right-footed by Steven Schumacher, Foul by Mark Hughes on James Tarkowski, free kick awarded. Free kick taken by Dean Bouzanis.14:51
Foul by Zac Thompson on James Wesolowski, free kick awarded. Direct free kick taken by Cliff Byrne.12:31
The free kick is swung in right-footed by Steven Schumacher, save by Dean Bouzanis. Steven Schumacher gives away a free kick for an unfair challenge on James Wesolowski. Dean Bouzanis restarts play with the free kick.12:31 Booking
Booking Jonathan Grounds receives a yellow card.12:21
Jonathan Grounds challenges Dominic Poleon unfairly and gives away a free kick.10:15
Jonathan Grounds sends in a cross, clearance made by Mark Hughes. James Tarkowski challenges David Healy unfairly and gives away a free kick. Free kick taken by Trevor Carson.7:31
David Worrall sends in a cross, Tom Hopper takes a shot. Save by Dean Bouzanis. Outswinging corner taken by Steven Schumacher, Dominic Poleon takes a shot. Save by Dean Bouzanis. Zac Thompson takes a shot from deep inside the box clearing the bar.6:50
The referee blows for offside. Free kick taken by Trevor Carson.6:15
Joe Skarz gives away a free kick for an unfair challenge on Robbie Simpson. Dean Bouzanis takes the free kick.5:22
David Healy is ruled offside. Dean Bouzanis takes the free kick.3:02
Jose Baxter shoots direct from the free kick.3:02 Booking
Booking Joe Skarz receives a yellow card.2:49
Joe Skarz challenges Matt Derbyshire unfairly and gives away a free kick.1:41
Matt Doherty produces a cross, James Wesolowski gets a block in. Inswinging corner taken from the right by-line by Steven Schumacher.0:00
The game gets underway.
Live data and text provided by our data suppliers