Goals by Charlie Austin, Stefan Johansen and Albert Adomah guided QPR to a final-day victory over Luton.
Austin netted his eighth goal of the season to open the scoring before Kiernan Dewsbury-Hall brought Luton level before the break.
But Johansen restored Rangers' lead, firing past Simon Sluga on the hour before Adomah added a third in injury time.
The victory saw QPR finish ninth - their best finish for six years - while the Hatters ended the campaign in 12th.
Austin put Rangers ahead in the 20th minute, latching on to Lyndon Dykes' knockdown and taking a touch before steering his finish into the far corner.
But Luton threatened on the break and it needed a superb reflex stop from Seny Dieng to push Sonny Bradley's volley on to the post.
The visitors levelled two minutes before the break when George Moncur broke and forced another save from Dieng, but the QPR defence were slow to react to the loose ball and Dewsbury-Hall bundled it into the net.
Rangers regained the advantage when Ilias Chair slid a deft pass through for Johansen and the Norwegian midfielder held his nerve to slot home.
Chris Willock and George Thomas went close to sealing the points before substitute Adomah did just that, netting his second QPR goal deep into added time.