Blackpool secured their Championship safety as Ludovic Sylvestre's injury-time winner gave them a home victory against Derby.
Gary Taylor-Fletcher tapped the hosts in front after being set up by Thomas Ince, who later missed a penalty.
The miss looked costly when Derby substitute Ben Davies volleyed a second-half leveller.
But Sylvestre scored with a volley from the edge of the box as his side claimed their third successive home win.
The result takes the Tangerines up to 15th in the Championship and mathematically safe from relegation after a run of only three wins in 13 games had seen them fall down the table.
Derby, who are 13th in the table, had the game's first real chance when Jeff Hendrick drove into the box, only to see his shot blocked by Craig Cathcart.
Taylor-Fletcher then notched his fifth goal of the season, all of them coming at Bloomfield Road, from close range after Ince picked him out.
Blackpool were handed the chance for a second goal when they were awarded a penalty following Craig Bryson's challenge on Kirk Broadfoot.
The Derby midfielder appeared to win the ball, but the Rams will feel justice was served as Ince's spot-kick struck the upright.
The visitors survived another scare in the 50th minute when John Brayford cleared Taylor-Fletcher's shot off the line.
Davies had only been on the pitch three minutes when he levelled for the Rams, volleying home Chris Martin's cross.
Rams keeper Adam Legzdins saved from Nathan Delfouneso with five minutes remaining, before Davies made two clearances off the line that looked like ensuring Derby would earn a point.
But Sylvestre's late volley condemned Nigel Clough's team to a 13th away league defeat this season.
Blackpool manager Paul Ince:
"I'm glad this fantastic club has managed to stay in the Championship and we can go forward next year.
"I'm a bit gutted that it's taken us this long to salvage where we are going to be. You want to be proactive rather than reactive in your planning but we've had to wait until the second-last game to be safe.
"Now I will sit down with the chairman and start getting some targets. We do need fresh faces. I don't want to dismantle the whole team, we have a fantastic core here and spirit, but I just want to add to it."
Derby manager Nigel Clough:
"There was nothing in the game, I thought we edged it second half and we were going to go on and win the game but we end up losing instead of getting a point.
"We thought our performance warranted at least a point. We just vacated the edge of the box in the last few minutes, which we are disappointed with.
"The players are very angry at losing because we hate it, but also they are very angry and upset at the officials' performance - all three of them. You start to doubt a little bit with some of the decisions that were made."
Sorry, we were unable to load match stats, please try again.
Live Text Commentary
Full Time The referee signals the end of the game.90:00 +4:41
Free kick taken by Matt Gilks.90:00 +4:41 Booking
Booking Matt Gilks receives a caution.90:00 +3:55
Craig Bryson is penalised for handball and concedes a free kick.90:00 +3:37
The ball is crossed by Craig Bryson, clearance made by Chris Basham.90:00 +2:22 Substitution
Substitution Neal Eardley is brought on as a substitute for Tom Ince.90:00 +0:35 Goal scored
Goal! - Ludovic Sylvestre - Blackpool 2 - 1 Derby Ludovic Sylvestre finds the back of the net with a goal from just outside the area to the top right corner of the goal. Blackpool 2-1 Derby.89:28
Free kick awarded for a foul by Kieron Freeman on Chris Basham. Stephen Crainey delivers the ball, Nathan Delfouneso takes a shot.88:33
Michael Jacobs is adjudged to have handled the ball. Direct free kick taken by Craig Cathcart.88:07
John Brayford challenges Matt Phillips unfairly and gives away a free kick. Direct free kick taken by Matt Gilks.87:35
Free kick awarded for a foul by Gary MacKenzie on Chris Martin. John Brayford takes the free kick.86:00
The ball is swung over by Michael Jacobs, Kirk Broadfoot gets a block in. Corner taken by Ben Davies, Matt Gilks makes a save.85:27
Matt Phillips gives away a free kick for an unfair challenge on Chris Martin. Direct free kick taken by Richard Keogh.84:14
The ball is swung over by Tom Ince, Nathan Delfouneso takes a shot. Save made by Adam Legzdins.82:19
Craig Cathcart takes the direct free kick.82:19 Substitution
Substitution Michael Jacobs on for Jamie Ward.82:19 Booking
Booking Caution for Jamie Ward.82:08
Kirk Broadfoot fouled by Jamie Ward, the ref awards a free kick.79:50
The ball is swung over by John Brayford, blocked by Stephen Crainey. Corner from the right by-line taken by Ben Davies, Chris Basham fouled by Richard Keogh, the ref awards a free kick. Free kick taken by Matt Gilks.79:19
Free kick awarded for an unfair challenge on Chris Martin by Kirk Broadfoot. Direct free kick taken by Jamie Ward.
The ball is crossed by Nathan Delfouneso.77:22
Foul by Kieron Freeman on Chris Basham, free kick awarded. Direct free kick taken by Matt Gilks.76:22
Ben Davies crosses the ball in from the free kick, clearance by Gary MacKenzie.76:22 Booking
Booking The referee books Craig Cathcart for unsporting behaviour.76:05
Craig Cathcart concedes a free kick for a foul on Craig Bryson.74:27
The free kick is swung in left-footed by Stephen Crainey, save by Adam Legzdins.74:27 Substitution
Substitution Kieron Freeman on for Will Hughes.74:27
Craig Forsyth challenges Tom Ince unfairly and gives away a free kick.72:31
Stephen Crainey delivers the ball from the free kick left-footed from right channel. The assistant referee flags for offside against Nathan Delfouneso. Adam Legzdins takes the free kick.72:31 Booking
Booking The referee books Craig Forsyth for unsporting behaviour.72:25
Craig Forsyth gives away a free kick for an unfair challenge on Tom Ince.71:37
The ball is crossed by Ben Davies.71:03
Shot from long distance by Ludovic Sylvestre misses to the right of the target.69:54
Unfair challenge on Will Hughes by Kirk Broadfoot results in a free kick. Free kick taken by Adam Legzdins.69:23
Free kick awarded for an unfair challenge on Jeff Hendrick by Nathan Delfouneso. Jake Buxton restarts play with the free kick.68:07 Booking
Booking Chris Martin goes into the book.66:46
Craig Bryson has an effort at goal from the edge of the box that misses to the right of the target.66:15
Craig Bryson takes a shot. Blocked by Gary MacKenzie.65:51 Substitution
Substitution Chris Basham is brought on as a substitute for Gary Taylor-Fletcher.64:15
The assist for the goal came from Chris Martin.64:15 Goal scored
Goal! - Ben Davies - Blackpool 1 - 1 Derby Goal scored by Ben Davies from just inside the penalty area to the bottom left corner of the goal. Blackpool 1-1 Derby.63:58
Shot from 12 yards from Chris Martin. Ludovic Sylvestre gets a block in.61:28
Ben Davies has an effort direct from the free kick.61:28 Substitution
Substitution Ben Davies is brought on as a substitute for Conor Sammon.61:28 Booking
Booking Nathan Delfouneso goes into the book for unsporting behaviour.61:23
Free kick awarded for a foul by Nathan Delfouneso on Craig Forsyth.60:21
Matt Phillips takes a shot. Save by Adam Legzdins.59:48
Unfair challenge on Matt Phillips by John Brayford results in a free kick. Direct free kick taken by Stephen Crainey.58:52
The ball is delivered by Jamie Ward, Chris Martin takes a shot. Save made by Matt Gilks.57:54
Unfair challenge on Gary MacKenzie by Chris Martin results in a free kick. Matt Gilks takes the direct free kick.57:24
The ball is sent over by John Brayford, clearance by Gary MacKenzie.56:02
A cross is delivered by Conor Sammon, blocked by Craig Cathcart. Jamie Ward takes a inswinging corner from the left by-line to the near post, clearance by Nathan Delfouneso.55:08
The ball is delivered by Chris Martin.54:22
Gary Taylor-Fletcher concedes a free kick for a foul on Richard Keogh. Jake Buxton restarts play with the free kick.53:36
Unfair challenge on Will Hughes by Nathan Delfouneso results in a free kick. Free kick taken by Richard Keogh.51:31
Jamie Ward takes the inswinging corner, Stephen Crainey manages to make a clearance.49:46
Gary Taylor-Fletcher takes a weak shot. Clearance by John Brayford. Matt Phillips takes the inswinging corner, free kick awarded for an unfair challenge on Jake Buxton by Kirk Broadfoot. Free kick taken by Adam Legzdins.48:49
Matt Phillips takes a shot. Jeff Hendrick gets a block in.46:50
Foul by Will Hughes on Matt Phillips, free kick awarded. Shot comes in from Stephen Crainey from the free kick, Adam Legzdins makes a save. Corner taken by Matt Phillips from the left by-line to the near post, clearance made by Richard Keogh.45:53
Jamie Ward sends in a cross, Effort on goal by John Brayford from just inside the area clears the bar.45:22
Foul by Stephen Crainey on Will Hughes, free kick awarded. Craig Bryson takes the direct free kick.45:01
The referee starts the second half.45:00 +2:06 Half time
Half Time The whistle is blown to end the first half.45:00 +1:11
Kirk Broadfoot fouled by Chris Martin, the ref awards a free kick. Craig Cathcart restarts play with the free kick.45:00 +0:15
Jamie Ward takes a floated corner from the right by-line played to the near post, Nathan Delfouneso makes a clearance.44:26
The ball is swung over by Kirk Broadfoot, Headed effort from deep inside the penalty area by Gary Taylor-Fletcher misses to the left of the goal.43:03
Centre by Jamie Ward, save by Matt Gilks.41:37
Chris Martin takes the chance to get an effort at goal. Save by Matt Gilks.41:23
Centre by John Brayford, Nathan Delfouneso manages to make a clearance.40:37
The ball is swung over by Chris Martin.37:49
Matt Phillips delivers the ball.36:22
Tom Ince takes a shot. Richard Keogh gets a block in. Outswinging corner taken by Tom Ince, clearance made by Chris Martin.34:34
Matt Phillips fouled by Craig Forsyth, the ref awards a free kick. The free kick is swung in left-footed by Tom Ince.33:58
Kirk Broadfoot fouled by Will Hughes, the ref awards a free kick. Free kick taken by Barry Ferguson.30:15 Penalty
Penalty missed by Tom Ince.30:15
Stephen Crainey sends in a cross. Unfair challenge on Kirk Broadfoot by Craig Forsyth results in a Penalty.28:37
Unfair challenge on Kirk Broadfoot by Jamie Ward results in a free kick. Direct free kick taken by Barry Ferguson.26:30
Inswinging corner taken right-footed by Jamie Ward.25:34
Jamie Ward produces a right-footed shot from long distance which goes wide right of the goal.25:21
Craig Forsyth sends in a cross, Craig Cathcart manages to make a clearance.24:22
A cross is delivered by John Brayford, Chris Martin has an effort at goal from deep inside the area missing to the left of the target.23:23
Free kick awarded for an unfair challenge on Chris Martin by Stephen Crainey. Free kick taken by John Brayford.22:19
Kirk Broadfoot delivers the ball, Craig Bryson manages to make a clearance.21:03
Effort from outside the box by Jamie Ward goes wide right of the target.20:37
Free kick awarded for an unfair challenge on Richard Keogh by Gary Taylor-Fletcher. Direct free kick taken by Richard Keogh.19:36
Effort on goal by Tom Ince from 25 yards. Save by Adam Legzdins.17:46
Tom Ince provided the assist for the goal.17:46 Goal scored
Goal! - Gary Taylor-Fletcher - Blackpool 1 - 0 Derby Gary Taylor-Fletcher grabs a goal from close in to the top left corner of the goal. Blackpool 1-0 Derby.17:27
The ball is delivered by Nathan Delfouneso, Tom Ince takes a shot. John Brayford gets a block in.16:09
Jamie Ward produces a cross.11:15
Matt Phillips produces a cross, save by Adam Legzdins.10:26
Foul by Craig Bryson on Barry Ferguson, free kick awarded. Free kick taken by Matt Gilks.10:00
Jeff Hendrick takes a shot. Barry Ferguson gets a block in.8:07
Gary MacKenzie concedes a free kick for a foul on Richard Keogh. Adam Legzdins takes the free kick.7:27
Foul by Jamie Ward on Barry Ferguson, free kick awarded. Direct free kick taken by Stephen Crainey.6:01
Unfair challenge on Jamie Ward by Barry Ferguson results in a free kick. Direct free kick taken by Jamie Ward.5:01
Foul by Stephen Crainey on Jeff Hendrick, free kick awarded. Free kick taken by Adam Legzdins.3:38
John Brayford fouled by Ludovic Sylvestre, the ref awards a free kick. Richard Keogh takes the direct free kick.2:54
Matt Phillips has an effort at goal from just inside the box that misses to the left of the target.1:55
Craig Bryson is flagged offside by the assistant referee. Matt Gilks takes the free kick.0:00
The referee gets the match started.
Live data and text provided by our data suppliers