A late goal handed Chesterfield caretaker boss Guy Branston a second consecutive defeat, after they appeared to have rescued a point at home to Yeovil.
Top goalscorer Kristian Dennis came off the bench to score a beautiful goal that looked like it would hand Town a share of the spoils.
But James Bailey’s back post header on 90 minutes made it 3-2 and sparked wild scenes among the 101 travelling supporters.
It’s likely to be Branston’s last game in charge with Chesterfield hoping to unveil Jack Lester as their new boss later this week.
What the new man saw at the Proact on Tuesday showed the size of his task.
A desperately poor first half display saw Town 2-0 down at the break, before they fought back with an improved second half showing, only to throw it away at the death.
The evening got off to a disastrous start, losing a goal and a defender inside six minutes.
Olufela Olomola rolled the opener past Joe Anyon, via the post, from 18 yards.
Spireites centre-half Zak Jules then fell awkwardly and was stretchered off - Laurence Magure replacing him.
The woodwork then came to Town’s rescue, Anyon tipping Francios Zoko’s header onto the bar.
Chesterfield came close to a leveller, Gozie Ugwu’s half volley forcing a good save from Artur Krysiak.
Midway through the first half Yeovil doubled their advantage, Khan going one-on-one with Sam Hird, who tried to bring the winger down before Khan jinked inside and uncorked a beauty of a shot.
The goal sparked cries of ‘there’s only one Jack Lester’ from the Kop.
Tremainder of the first half was dreadful stuff and boos followed the players into the tunnel.
But within five minutes of the restart they lifted their supporters.
O’Grady was the architect with a low cross from the right, Robbie Weir sweeping home from six yards.
Chesterfield enjoyed more possession but struggled to break down a compact visiting defence.
With just under 25 minutes left Dennis replaced O’Grady and turned the game on its head, chipping Arthur Krysiak from 30 yards.
But as the game headed into stoppage time Yeovil attacked down the left, Sam Surridge crossed and captain Bailey nodded in the winner.
Chesterfield: Anyon, Wiseman, Briggs, Jules (Maguire 6), Hird, Weir, Reed, Kellett (Flores 73), De Girolamo, Ugwu, O’Grady (Dennis 66). Subs: Lee, Maguire, McCourt, Brewster, Dimaio, Dennis.
Yeovil Town: Krysiak, Smith, Worthington, Khan, Gray (Browne 88), Dickson, Zoko (Surridge 75), Bailey, James, Olomola (Green 66), Nelson. Subs: Davies, Maddison, Sowunmi, Santos.
Referee: Mr David Coote. Assistants: Mr Nick Hopton, Mr Adam Matthews.
Goals: Weir 50, Dennis 72; Olomola 3, Khan 26, Bailey 90
Yellows: Kellett 37, Weir 58; Smith 12, Worthington 90
Attendance: 3,995 (101 away)