Rotherham United beat Aldershot Town to secure promotion to League One, while the Shots were relegated to the Football Conference.
Johnny Mullins scored from close range to put the Millers in front before Lee Frecklington fired in from the edge of the box late on.
Victory means the Millers finish above Port Vale as runners up in League Two.
The Shots, who finish bottom of the table, leave the Football League after a five-year spell.
Aldershot almost took a shock lead before the break when Michael Rankine turned Danny Rose's cross just wide of the post.
But the Millers got the breakthrough they needed in the second half when Michael O'Connor's free-kick was fumbled by Jamie Young and Johnny Mullins stabbed home.
Frecklington then broke away to fire home in injury time and take Steve Evans's side up to the third tier.
VIEWS FROM THE DRESSING ROOM
Rotherham manager Steve Evans told BBC Radio Sheffield:
"It feels fantastic.
"I walked out on (Crawley) 12 months ago to come to a club that I believe could be a Championship club.
"We've got a lot of hard work to do to just be a League One club, but we'll get there very quickly under a fantastic chairman and supporters that have been incredible all season.
"And we've finished runners up to a very good Gillingham team."
Aldershot Town manager Andy Scott told BBC Surrey:
"You've got to have the mentality to win, and work hard and you've got to have a desire and pride in your own performance and not enough players in that dressing room over the season have done enough.
"Some will walk away thinking they've done enough but they haven't and so the mentality in the side, the structure and the way we recruit players has got to be better.
"There are players that have done well but the other people around them have got to do well and there's too many players who think they know it all."
- 01 Shearer
- 03 Davis
- 06 Mullins
- 37 Skarz
- 04 Arnason
- 10 O'Connor
- 15 Pringle
- 19 Noble (Rose - 90' )
- 27 Frecklington
- 09 Revell (Odejayi - 82' )
- 22 Agard (Nardiello - 54' )
- 21 Warrington
- 02 Tonge
- 33 Ridehalgh
- 07 Ainsworth
- 24 Rose
- 16 Odejayi
- 17 Nardiello
- 21 Young
- 02 Herd Booked
- 03 Tonkin
- 06 Lancashire
- 11 Vincenti (Reid - 46' )
- 23 Bradley
- 17 Mekki
- 18 Stanley
- 24 Hall
- 31 Rose
- 09 Rankine
- 01 Warner
- 16 Berqvrst
- 12 Risser
- 28 Cadogan
- 15 McCallum
- 20 Reid
- 26 Goulding
Live Text Commentary
Full Time The match has reached full-time.90:00 +3:49
Assist by Ben Pringle.90:00 +3:49 Goal scored
Goal! - Lee Frecklington - Rotherham 2 - 0 Aldershot A goal is scored by Lee Frecklington from inside the box to the bottom right corner of the goal. Rotherham 2-0 Aldershot.90:00 +1:33 Substitution
Substitution David Noble leaves the field to be replaced by Mitchell Rose.90:00 +0:51
Adam Mekki takes a shot. Clearance made by Claude Davis. Danny Rose takes a shot. Clearance made by Kari Arnason.87:43
Short corner worked by Ben Pringle.84:41
Corner taken by Michael O'Connor.83:12
Daniel Nardiello concedes a free kick for a foul on Danny Rose. Direct free kick taken by Danny Rose. Corner taken by Adam Mekki from the left by-line, save made by Scott Shearer.81:29 Substitution
Substitution Kayode Odejayi comes on in place of Alex Revell.76:31
The official flags Daniel Nardiello offside. Jamie Young restarts play with the free kick.75:46
Shot by Alex Revell. Save by Jamie Young.74:51
Corner taken by Ben Pringle from the right by-line.73:54
The referee blows for offside against Alex Revell. Jamie Young restarts play with the free kick.72:54
Unfair challenge on Scott Shearer by Sonny Bradley results in a free kick. Direct free kick taken by Scott Shearer.72:24
Foul by Johnny Mullins on Adam Mekki, free kick awarded. Direct free kick taken by Danny Rose.68:48
Ben Pringle takes a shot. Save by Jamie Young. David Noble decides to take the corner short, Ben Pringle takes a shot. Save by Jamie Young. Ben Pringle is ruled offside. Indirect free kick taken by Jamie Young.68:10
Foul by Alex Revell on Craig Stanley, free kick awarded. Free kick taken by Ben Herd.66:26
Joe Skarz challenges Adam Mekki unfairly and gives away a free kick. Craig Stanley takes the direct free kick.63:29
Michael O'Connor provided the assist for the goal.63:29 Goal scored
Goal! - Johnny Mullins - Rotherham 1 - 0 Aldershot Johnny Mullins gets on the score sheet with a goal from inside the six-yard box to the bottom right corner of the goal. Rotherham 1-0 Aldershot.
The ball is crossed by Michael O'Connor, save by Jamie Young.62:25
Direct free kick taken by Michael O'Connor.62:25 Booking
Booking Ben Herd goes into the referee's book.62:21
Ben Herd challenges Daniel Nardiello unfairly and gives away a free kick.59:31
David Noble is adjudged to have handled the ball. Danny Rose produces a strike on goal direct from the free kick, save by Scott Shearer.58:53
Free kick awarded for an unfair challenge on Jamie Young by Michael O'Connor. Jamie Young takes the direct free kick.56:16
A cross is delivered by Michael O'Connor, clearance by Sonny Bradley.53:37
Michael O'Connor takes the free kick.53:37 Substitution
Substitution Kieran Agard goes off and Daniel Nardiello comes on.53:37
Foul by Oliver Lancashire on Alex Revell, free kick awarded.52:49
Alex Revell takes a shot. Save made by Jamie Young.51:02
Kieran Agard delivers the ball, Alex Revell takes a shot. Save by Jamie Young.49:42
Adam Mekki takes a shot. Lee Frecklington gets a block in. Inswinging corner taken by Danny Rose.48:46
The offside flag is raised against Alex Revell. Indirect free kick taken by Jamie Young.45:01
The referee gets the second half started.45:01 Substitution
Substitution Peter Vincenti goes off and Craig Reid comes on.45:00 +2:04 Half time
Half Time It is the end of the first-half.45:00 +0:05
Effort from the edge of the penalty box by Anthony Tonkin goes wide of the right-hand upright.43:53
The assistant referee flags for offside against Alex Revell. Jamie Young restarts play with the free kick.41:47
Anthony Tonkin challenges Kieran Agard unfairly and gives away a free kick. Direct free kick taken by Scott Shearer.41:00
The official flags Alex Revell offside. Jamie Young restarts play with the free kick.35:13
Inswinging corner taken right-footed by Craig Stanley from the left by-line.33:47
Michael O'Connor gives away a free kick for an unfair challenge on Danny Rose. Jamie Young restarts play with the free kick.29:08
Free kick awarded for an unfair challenge on Alex Revell by Sonny Bradley. Ben Pringle crosses the ball in from the free kick, save by Jamie Young.28:14
Adam Mekki is caught offside. Indirect free kick taken by Scott Shearer.27:31
Alex Revell takes a shot. Save made by Jamie Young.26:57
The ball is sent over by Craig Stanley.25:11
Foul by Peter Vincenti on Johnny Mullins, free kick awarded. Free kick taken by Kari Arnason.21:45
Peter Vincenti delivers the ball.19:56
Ben Herd fouled by Ben Pringle, the ref awards a free kick. Direct free kick taken by Jamie Young.16:28
Ben Pringle sends in a cross, save by Jamie Young.9:09
Effort from deep inside the area by Alex Revell misses to the right of the target.8:53
Lee Frecklington takes a shot. Oliver Lancashire gets a block in.7:26
Kieran Agard takes a shot. Blocked by Sonny Bradley.6:22
Long range effort from Michael O'Connor misses to the left of the target.4:22
Ben Pringle fouled by Danny Rose, the ref awards a free kick. Michael O'Connor has an effort direct from the free kick.2:56
Alex Revell gives away a free kick for an unfair challenge on Sonny Bradley. Direct free kick taken by Jamie Young.1:03
Ben Pringle takes a shot from just inside the penalty box which clears the bar.0:00
The game gets underway.
Live data and text provided by our data suppliers