Sky Bet League One
Rochdale 1 Charlton Athletic 0
JOE Thompson's winner saw Rochdale beat the drop - five months after he returned to football following a second battle with cancer.
If ever there was a title of local hero, then the 29-year-old deserves to take top billing.
The midfielder, who was born and raised in the town, struck in the 65th minute to give Keith Hill's men the win they needed to avoid relegation to the fourth tier.
It came after they were cut 12 points adrift at the bottom of the table in February.
Rochdale's supporters had a nail biting seven minutes following full time as they waited on close neighbours Oldham Athletic's result at Northampton Town.
Luckily for them, Oldham could only manage a draw at Sixfields, meaning they were relegated to League Two instead of Rochdale.
A delighted Hill said: "It seemed like an impossible task at times.
"I'm really pleased with the players' response because I knew that, with 16 games left, it was the start of our mini-season.
"I told them not to panic and not to lose faith and, today, they performed well under extreme pressure and they believed in me."
And what a roller coaster of a season it has been for Rochdale.
Stuck in the bottom half of the division for most of the campaign, they held Tottenham Hotspur to a 2-2 draw in the FA Cup fifth round at the Crown Oil Arena, taking the Premier League side to a replay at Wembley.
But, after this result, they will look forward to welcoming the likes of Sunderland.
Despite defeat, Charlton cemented their place in the play-offs and will meet Shrewsbury Town over two legs for the chance to reach the final at Wembley.
Their interim manager, Lee Bowyer, has done a remarkable job since taking over from Karl Robinson in March, leading them to 19 points out of a possible 24.
He said: "I am disappointed to lose the game because we want to win every game we play.
"It wasn't about today for me - it was more about seeing certain things and getting ready for the games against Shrewsbury."
Rochdale's best period of the first half came in the opening 10 minutes.
Callum Camps' free-kick was parried by Charlton goalkeeper Ben Amos before it came out to captain Ian Henderson.
But Rochdale's leading goalscorer this season, with 20 strikes, saw his effort hit the post.
Then Jimmy McNulty gave the ball away to Joe Aribo but, luckily, the Charlton youngster's shot from the edge of the box was tame enough for it to be easily collected by Rochdale goalkeeper Josh Lillis.
Rochdale forward Calvin Andrew was proving a handful for the Charlton defence, winning the first time balls and creating opportunities for his team mates.
It was his ball which lead to Ryan Delaney's header being saved by Amos before McNulty failed to reach the rebound and Camps put the ball just wide of the post.
The visitors, though, were dangerous on the counter attack and were causing Rochdale problems with their pace.
A Mark Marshall free kick was comfortably dealt with by Lillis and then Jake Forster-Caskey's long range effort took a deflection which the Rochdale stopper tipped around the woodwork.
Charlton continued to exert the pressure.
Forster-Caskey went close again after meeting Marshall's free-kick on the edge of the box and Lillis did well to collect an Aribo effort.
Aribo, who is reportedly being coveted by a host of Championship and Premier League clubs, was a constant menace on the left flank.
And his inch-perfect cross was met by Michal Zyro, who was unlucky to find Delaney getting the better of him.
The second-half saw a resurgent Rochdale take the game to Charlton - they had no other choice.
Camps was put through on goal but, with just Amos to beat, totally mishit the ball and skewed the chance to give his team a vital lead.
Hill decided to ring the changes just past the hour mark, bringing on both Thompson and Steven Davies in a bid to pose more of an attacking thirst.
And it worked.
Six minutes later, Joe Rafferty's pass reached Henderson.
He was dragged to the ground by Ezra Kosnsa, but referee Terry Harrington played the advantage and the ball fell for Thompson, who smashed the ball beyond Amos to send the stadium into raptures.
Charlton came pouring forward but Rochdale, who have kept 16 clean sheets this season, a total bettered only by the promotion duo of Wigan Athletic and Blackburn Rovers, stayed resolute.
Harrison McGahey blocked substitute Stephy Mavididi as he was about to take aim inside the box, before Delaney got in the way of Ahmed Kashi's effort on goal.
Rochdale remained firm until the the full time whistle, claiming the three points and making sure that their stay in League One continues.
Rochdale: Lillis; McGahey, McNulty (Davies, 62), Delaney; Rafferty, Inman (Hart, 86), Rathbone (Thompson, 62); Camps, Done; Henderson; Andrew.
Substitutes not used: Moore, Wiseman, Mitching and Humphrys.
Charlton Athletic: Amos; Pearce, Konsa, Kashi; Bauer, Forster-Caskey (Reeves, 59), Marshall, Aribo (Jackson, 90), Dasilva; Kaikai (Mavididi, 66); Zyro.
Substitutes not used: Phillips, Dijksteel, Sarr and Magennis.