Kilmarnock claimed three crucial points in their bid to avoid relegation from the Scottish Premier League with a thrilling comeback against Aberdeen.
Mark Kerr put the Dons ahead with a great strike from the edge of the box into the top corner in 26 minutes.
Liam Kelly scored a deserved equaliser for Killie after a period of sustained second-half pressure.
Then Kevin Kyle, a Dons signing target, met Graeme Owens' perfect cross to head home a stunning 74th-minute winner.
Aberdeen may already have secured their Scottish Premier League status but manager Mark McGhee was keen to end a disappointing campaign on a high.
The Reds' cause was not helped by the enforced absence of defenders Zander Diamond and Richard Foster, who, much to manager McGhee's annoyance, were sent off in the defeat by Hamilton on Saturday.
Killie had only two chances of note in the first half, one of those falling to Craig Bryson, whose snap-shot was handled well by Alan Combe.
The other came from the boot of centre-forward Kyle, who controlled a volleyed pass from Manuel Pascali and attempted to lob keeper Stuart Nelson from just inside the box, but the ball dropped just wide of the post.
Aberdeen had offered little apart from a Sone Aluko shot that was blocked by former Don Scott Severin, but they posted a warning on 25 minutes when Aluko squared for Darren Mackie to shoot, forcing a brilliant save by Combe.
The breakthrough came seconds later from a most unlikely source.
Kerr's last goal came in 2006 when he scored for Dundee United against Livingston, but the defensive midfielder looked every bit the star striker when he unleashed a terrific shot from the edge of the box to put the Dons ahead.
As half-time approached, Steven MacLean held the ball up well and set up Mackie, whose 25-yard shot fizzed narrowly wide of Combe's post.
Prior to kick-off, Kilmarnock were above Falkirk, who occupied the automatic relegation spot with an inferior goal difference.
But at half-time, with the Bairns goalless against St Johnstone, Killie had moved to the bottom of the table. Worse, having scored only four league goals away from home all season, the chances of scoring twice to turn the match around looked remote.
Yet they started the second half much the brighter. Kelly's intelligent cross into the box was knocked on by Bryson, and Frazer Wright was foiled by Nelson's fine save.
With a sense of momentum, Tim Clancy found Kyle and his ball across the six-yard box ought to have produced a goal but Wright narrowly missed connecting with the ball.
James Fowler tested Nelson on the hour mark, then Kyle failed to hit the target as they pinned the Reds back.
The equaliser came from the boot of Kelly, who found the net from the edge of box.
Immediately, Calderwood sent on Owens and within three minutes the substitute had pinged a perfect ball onto the head of Kyle and the Scotland cap bulleted a header into the net.
Charlie Mulgrew tried a long-range hit that Combe saved well as Kilmarnock clung on in the final minutes.
With Falkirk drawing at home to St Johnstone, Killie move two points clear of bottom-placed Bairns, who visit Rugby Park in Saturday's season finale.
Live text and stats
Wednesday, 5 May 2010
08 Kerr yellow card
11 Aluko (Paton 54)
14 Young (Robertson 85)
04 Fowler (Owens 69)
12 Skelton (Invincibile 46)
Ref: AllanAtt: 6,097
Attempts on target
Attempts off target
90:00+1:56 The referee blows for the end of the match.
90:00+0:53 Stuart Duff produces a cross, Tim Clancy gets a block in.
89:29 The referee penalises Davide Grassi for handball. Tim Clancy restarts play with the free kick.
88:55 A cross is delivered by Mark Kerr, Scott Severin manages to make a clearance.
88:25 Gary McDonald takes the outswinging corner, Frazer Wright makes a clearance.
88:15 Charlie Mulgrew takes a shot. Blocked by Scott Severin.
87:12 Corner taken short by Mark Kerr, clearance by Scott Severin.
86:21 Craig Bryson concedes a free kick for a foul on Clark Robertson. Charlie Mulgrew has an effort direct from the free kick,
save by Alan Combe.
84:29 Substitution Clark Robertson replaces Derek Young.
84:29 Charlie Mulgrew fouled by Kevin Kyle, the ref awards a free kick. Stuart Nelson restarts play with the free kick.
82:25 Charlie Mulgrew crosses the ball.
80:31 Free kick awarded for an unfair challenge on Craig Bryson by Gary McDonald. Alan Combe restarts play with the free kick.
77:18 Darren Mackie is flagged offside by the assistant referee. Alan Combe takes the direct free kick.
75:55 Stuart Duff delivers the ball, clearance made by Frazer Wright.
Correction - 74:57 Charlie Mulgrew produces a cross.
74:57 The ball is sent over by Charlie Mulgrew.
73:33 Assist by Jamie Hamill.
73:33 GOAL - Kevin Kyle:Aberdeen 1 - 2 Kilmarnock Kevin Kyle scores a headed goal from close range. Aberdeen 1-2 Kilmarnock.
73:28 Graeme Owens crosses the ball,
72:44 Handball decision goes against Darren Mackie. Direct free kick taken by Scott Severin.
71:40 The ball is swung over by Michael Paton, save by Alan Combe.
70:26 The ball is crossed by Michael Paton, clearance made by Craig Bryson.
69:51 Unfair challenge on Derek Young by Daniele Invincibile results in a free kick. Free kick crossed right-footed by Stuart Duff
from right channel, clearance made by Scott Severin.
68:59 Substitution (Kilmarnock) makes a substitution, with Graeme Owens coming on for James Fowler.
68:03 GOAL - Liam Kelly:Aberdeen 1 - 1 Kilmarnock A goal is scored by Liam Kelly from the edge of the penalty box to the bottom right corner of the goal. Aberdeen 1-1 Kilmarnock.
67:06 Stuart Duff challenges Jamie Hamill unfairly and gives away a free kick. Jamie Hamill takes the free kick.
66:45 Cross/shot by Michael Paton, Alan Combe makes a save.
65:34 Manuel Pascali gives away a free kick for an unfair challenge on Steven MacLean. Strike on goal comes in from Charlie Mulgrew
from the free kick.
64:56 Free kick awarded for an unfair challenge on Stuart Duff by Kevin Kyle. Stuart Nelson takes the free kick.
60:08 James Fowler takes a shot. Save made by Stuart Nelson.
59:53 James Fowler takes a shot. Stuart Nelson makes a save.
59:25 Stuart Duff challenges Jamie Hamill unfairly and gives away a free kick. Free kick taken by Craig Bryson.
57:13 James Fowler gives away a free kick for an unfair challenge on Davide Grassi. Charlie Mulgrew crosses the ball in from the
56:27 Craig Bryson produces a cross, save by Stuart Nelson.
55:18 Jamie Hamill challenges Michael Paton unfairly and gives away a free kick. Davide Grassi takes the free kick.
54:39 Steven MacLean concedes a free kick for a foul on Tim Clancy. The ball is delivered by Tim Clancy, Kevin Kyle takes a shot.
Save by Stuart Nelson.
53:36 Substitution Michael Paton joins the action as a substitute, replacing Sone Aluko.
52:40 The offside flag is raised against Kevin Kyle. Stuart Nelson takes the direct free kick.
50:05 Jamie Hamill crosses the ball, Header by Manuel Pascali from inside the area strikes the post.
50:05 Booking The referee books Mark Kerr for unsporting behaviour.
49:59 Unfair challenge on Liam Kelly by Mark Kerr results in a free kick.
49:06 Craig Bryson challenges Gary McDonald unfairly and gives away a free kick. Stuart Duff takes the free kick.
48:29 The ball is swung over by Liam Kelly, Effort on goal by Frazer Wright from 12 yards. Stuart Nelson makes a save.
47:55 Craig Bryson takes the outswinging corner, Mark Kerr manages to make a clearance.
46:24 Unfair challenge on Derek Young by Liam Kelly results in a free kick. The free kick is delivered left-footed by Sone Aluko
from right wing, clearance by Scott Severin.
Correction - 45:40 Craig Bryson gives away a free kick for an unfair challenge on Steven MacLean. Charlie Mulgrew takes the direct free kick.
45:40 Craig Bryson challenges Steven MacLean unfairly and gives away a free kick. Charlie Mulgrew takes the free kick.
45:01 The referee gets the second half started.
45:01 Substitution Daniele Invincibile on for Gavin Skelton.
45:00+0:59 The match has reached half-time.
43:42 Darren Mackie produces a left-footed shot from just outside the box that goes wide right of the target.
42:24 Free kick awarded for a foul by Stuart Duff on James Fowler. Alan Combe takes the free kick.
42:02 The ball is delivered by Stuart Duff, Liam Kelly gets a block in.
40:57 Inswinging corner taken from the left by-line by Derek Young.
40:52 Sone Aluko produces a cross, Manuel Pascali gets a block in.
40:19 Mark Kerr takes a long range shot clearing the bar.
39:43 The ball is sent over by Liam Kelly, save by Stuart Nelson.
38:56 Craig Bryson takes a shot. Save by Stuart Nelson.
35:52 Tim Clancy produces a cross, Jerel Ifil makes a clearance.
35:37 Foul by Charlie Mulgrew on Kevin Kyle, free kick awarded. Jamie Hamill takes the direct free kick.
35:28 Gary McDonald delivers the ball, Liam Kelly manages to make a clearance.
34:34 Tim Clancy sends in a cross, Headed effort from inside the penalty area by Kevin Kyle misses to the right of the target.
32:48 A cross is delivered by Jamie Hamill, save made by Stuart Nelson.
31:05 The ball is sent over by Craig Bryson, Headed effort from inside the area by Kevin Kyle misses to the left of the target.
29:22 Free kick awarded for a foul by Darren Mackie on Jamie Hamill. Direct free kick taken by Scott Severin.
28:03 Centre by Davide Grassi.
26:39 Steven MacLean is caught offside. Alan Combe restarts play with the free kick.
25:59 GOAL - Mark Kerr:Aberdeen 1 - 0 Kilmarnock Mark Kerr gets on the score sheet with a goal from the edge of the area to the top right corner of the goal. Aberdeen 1-0
25:33 Corner taken by Sone Aluko from the right by-line to the near post.
25:04 Steven MacLean takes a shot. Save made by Alan Combe.
24:48 Darren Mackie concedes a free kick for a foul on Frazer Wright. Frazer Wright restarts play with the free kick.
23:02 The referee blows for offside. Stuart Nelson takes the free kick.
19:48 Foul by Derek Young on Gavin Skelton, free kick awarded. Scott Severin takes the direct free kick.
16:26 The ball is sent over by Derek Young, Frazer Wright manages to make a clearance.
13:47 Craig Bryson is caught offside. Stuart Nelson restarts play with the free kick.
13:13 Darren Mackie takes a shot. Kevin Kyle gets a block in.
12:25 The ball is delivered by Darren Mackie, save by Alan Combe.
11:02 Kevin Kyle has an effort at goal from just inside the box that misses to the left of the target.
9:36 Liam Kelly fouled by Steven MacLean, the ref awards a free kick. Scott Severin restarts play with the free kick.
9:00 Inswinging corner taken by Derek Young, clearance by Manuel Pascali.
8:47 Sone Aluko takes a shot. Blocked by Scott Severin.
8:31 Unfair challenge on Steven MacLean by James Fowler results in a free kick. Steven MacLean takes the free kick.
8:10 The ball is crossed by Davide Grassi, Scott Severin makes a clearance.
7:58 Stuart Duff crosses the ball, clearance made by Tim Clancy.
6:50 Centre by Kevin Kyle, clearance made by Stuart Duff.
6:26 Centre by Kevin Kyle, Jerel Ifil manages to make a clearance.
4:07 Kevin Kyle is ruled offside. Charlie Mulgrew takes the free kick.
3:43 Kevin Kyle delivers the ball, save made by Stuart Nelson.
1:20 The offside flag is raised against Sone Aluko. Free kick taken by Alan Combe.
1:15 A cross is delivered by Jerel Ifil.
0:00 The match has kicked off.
Live text and data provided by The Press Association.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.