Already-relegated Bury shocked play-off contenders Yeovil Town with a battling win at Gigg Lane.
The hosts took an early lead when Jonson Clarke-Harris shot through a crowded penalty area.
Clarke-Harris added a second from a free-kick before Nick Ajose slotted past Marek Stech to round off a dream first half for the Shakers.
James Hayter's header and Kevin Dawson's shot set up a grandstand finish but Bury held on.
The result means Yeovil face Sheffield United over two legs in the League One play-off semi-finals, while Bury are 22nd and will be playing in the fourth tier next season.
VIEW FROM THE DRESSING ROOM
Yeovil Town manager Gary Johnson told BBC Somerset
"You've got to go into your play-off game seeing your game because our game, with these players, has got us where we are. But we didn't recognise our game.
"So we wanted to let people know that they were playing like individuals as opposed to a proper team. They had lost all thought of what we have been trying to achieve in our game.
"But to be fair we went out second half and we became a more relentless and actually we should have drawn.
"It was a really poor first half, I won't forget that. But what I can say to them is, you cannot afford a half like that in the play-offs."
Bury 30 Belford Booked 16 Sodje 17 Hughes 21 Holden (Eastham - 85' ) 34 Ebanks-Landell 07 Worrall 32 Thompson 35 Soares Booked 15 Ajose 26 Clarke-Harris 31 Fagan Booked Substitutes 05 Lockwood 06 Eastham 29 Pratt Yeovil 01 Stech 02 Ayling 13 Maksimenko 20 Edwards Booked (Williams - 74' ) 06 Blizzard Booked 08 Upson Booked 14 Foley 22 Dawson 09 Hayter (Hinds - 80' ) 15 Young Booked 17 Madden (Balanta - 81' ) Substitutes 12 Stewart 04 Hinds 10 Williams 27 Chainey 28 Emmanuel-Wilkinson 29 Balanta