Brentford missed out on automatic promotion to the Premier League and will join Fulham in the play-offs – despite QPR holding West Bromwich Albion to a 2-2 draw.
The Bees got the favour they needed from Rangers but a disastrous 2-1 defeat at home to Barnsley – their second successive loss since moving to within a point of Albion – meant they missed out on the top two.
Fulham, who began the night with an outside chance of automatic promotion, drew 1-1 at Wigan.
West Brom are back in the top flight but were made to sweat by Rangers, who went ahead through Ryan Manning’s goal.
The Baggies levelled through Grady Diangana just before half-time and Callum Robinson put them ahead on the hour mark.
But QPR hit back through Ebere Eze’s beautifully-taken goal – meaning Brentford would have gone up had they won.
Trailing to Callum Styles’ opener, Josh Dasilva’s goal hauled them level with 17 minutes remaining.
But Clark Odour’s injury-time goal ended the Bees’ hopes of a fairytale end at Griffin Park, which will host another match.
Meanwhile, Neeskens Kebano’s goal earned Fulham’s point at Wigan after Kieffer Moore had put the home side ahead.