Tranmere stayed up after comfortably securing a 3-0 victory at rock-bottom Stockport.
Gillingham's defeat meant Rovers escaped the drop in front of more than 3,000 travelling fans.
They took a well-deserved lead in the 38th minute when Ian Goodison crashed a close-range shot into the roof of the Stockport net after playing a neat one-two with Bas Savage.
Before that Shaleum Logan and Gareth Edds had gone close for Tranmere while Stockport replied when Adam Griffin placed a header inches wide from eight yards out.
Shortly before the break Joss Labadie almost made it two when his 30-yard drive was superbly beaten away by Stockport keeper Lloyd Rigby.
It was 2-0 in the 53rd minute when Zoumana Bakayogo crossed from the left and former Stockport striker Ian Thomas-Moore volleyed in from eight yards.
Tranmere wrapped up the win in the 76th minute when Labadie tapped home after Rigby spilled a shot from Savage.
Copyright (c) PA Sport 2009, All Rights Reserved.
Do YOU want to write for GiveMeSport? Get started today by signing-up and submitting an article HERE: http://gms.to/writeforgms