Match ends, Chester FC 4, Gateshead 2.
Chester top scorer Ross Hannah struck twice to help his team come from behind to finish their season with a third straight win against Gateshead.
The Heed led when right-back Ryan Higgins failed to clear CJ Hamilton's cross and sub Rob Ramshaw tapped in.
Kane Richards nodded in to level before Higgins' low long-range shot gave Chester the lead two minutes later.
But Rooney teed up Hannah, who was set up by Tom Shaw for a second before Dan Johnson scored from Ramshaw's cross.
Following their season-closing three victories, Chester finish 17th in the National League table, six points clear of trouble.
Neil Aspin's Gateshead ended up in ninth, 13 points adrift of a play-off place.
Hannah's 22-goal tally was beaten by only three other National League strikers, Cheltenham's Dan Holman and Grimsby's Padraig Amond, who both scored 30, and Barrow's Andy Cook (24).
Chester caretaker manager Jon McCarthy told BBC Radio Merseyside:
"I'm really pleased for the players. They can go and enjoy their summer now and the club can get on with what they have to do.
"But I wanted it for the fans too. We wanted to thank them after a frustrating season. We wanted a performance, and it came in the end.
"We talked about having a little bit more desire than them. We were quite ruthless. There was no sentiment or young players and we kept the same team and we knew Craig Mahon and Ross Hannah would want to come on.
"It is just playing more 4-4-2 than 4-2-4. It's about bringing wide players into deeper positions which actually gives them more of the ball, rather than them going and marking the full backs. It just makes us so much tighter."
- 11ChapellSubstituted forMahonat 59'minutesBooked at 75mins
- 15RichardsSubstituted forHobsonat 83'minutes
- 23AlabiSubstituted forHannahat 59'minutes
- 12MafutaBooked at 27minsSubstituted forChandlerat 37'minutesBooked at 46mins
- 6ClarkSubstituted forCurtisat 6'minutes
- 19BowmanSubstituted forRamshawat 37'minutesBooked at 75mins
- Richard Wigglesworth
- Shots on Target
Second Half ends, Chester FC 4, Gateshead 2.
Foul by Josh Gillies (Gateshead).
Ben Heneghan (Chester FC) wins a free kick.
Offside, Gateshead. Danny Johnson tries a through ball, but Danny Johnson is caught offside.
Attempt missed. Jamie Chandler (Gateshead) right footed shot from outside the box is too high.
Goal! Chester FC 4, Gateshead 2. Danny Johnson (Gateshead) left footed shot from the right side of the six yard box to the high centre of the goal. Assisted by Rob Ramshaw.
Attempt saved. Ross Hannah (Chester FC) left footed shot from outside the box is saved.
Substitution, Chester FC. Craig Hobson replaces Kane Richards.
Foul by Ben Heneghan (Chester FC).
Josh Gillies (Gateshead) wins a free kick.
Goal! Chester FC 4, Gateshead 1. Ross Hannah (Chester FC) left footed shot from the left side of the six yard box to the bottom right corner. Assisted by Tom Shaw.
Foul by Kane Richards (Chester FC).
James Curtis (Gateshead) wins a free kick.
Goal! Chester FC 3, Gateshead 1. Ross Hannah (Chester FC) left footed shot from outside the box to the bottom right corner. Assisted by John Rooney.
Foul by Alex Whitmore (Gateshead).
Kane Richards (Chester FC) wins a free kick.
Craig Mahon (Chester FC) is shown the yellow card for a bad foul.
Rob Ramshaw (Gateshead) is shown the yellow card for a bad foul.
Foul by Tom Shaw (Chester FC).