Match ends, Barnsley 2, Queens Park Rangers 3.
Charlie Austin scored the 100th goal of his professional career as QPR prepared for the Championship play-offs with a win at relegated Barnsley.
Armand Traore teed up Austin to fire Rangers in front and they quickly made it 2-0 when Jean-Yves Mvoto turned Kevin Doyle's cross into his own net.
Barnsley replied when Chris O'Grady headed home Dale Jennings' cross.
But Yun Suk-Young restored QPR's two-goal cushion with a fine solo goal before O'Grady's second.
QPR will play Wigan in the first leg of their play-off semi-final next weekend.
Both teams made a host of changes. With most of Barnsley's loan players returning this week the hosts made five, while QPR fielded seven changes with one eye on the match with Wigan.
Barnsley exerted the early pressure and, after a succession of corners, Dale Jennings hit the side-netting when played through by player-of-the-season O'Grady.
Things were livened up when QPR grabbed the lead in the 42nd minute. Austin, who signed from Burnley last August, found space in the box, received the ball and with time to compose himself neatly finished.
Within moments the visitors' lead was doubled by an own goal.
Doyle's dipping cross from the right caused uncertainty and Yves Mvoto's intervention could only slice the ball over his keeper and into the net, giving QPR a two-goal cushion at half-time.
With the game more open after the interval Barnsley pulled one back - Jennings' left-wing cross found O'Grady eight yards out and the striker's low header hit the target.
However, chances of a home fightback were all but extinguished in the 68th minute when Yun scored a scintillating individual goal where he beat three Barnsley defenders then finished emphatically.
O'Grady gave Barnsley hope with a curling effort from 25 yards, but it was too late for the hosts as QPR held on.
Barnsley manager Danny Wilson: "We were playing against a top-quality team and you're going to have parts of the game where you lose possession to them, but we held our own very well.
"It'll be tough to get the players in that we want next season, but I'd like to think that in League One we're a bit of a draw.
"It's bound to be a much-changed side in August."
QPR assistant manager Kevin Bond: "I always felt once we took the lead that we'd hold them off. You never like to concede goals but we had a much-changed side than we normally play.
"We needed to have one eye on whoever we're going to play next Friday in the play-offs, so we did what we thought was the right thing.
"We want to bounce straight back up, desperately. We're going to face Wigan now and it's going to be a very difficult game."
- 22MvotoSubstituted forBreeat 73'minutes
- 19CywkaSubstituted forNoble-Lazarusat 72'minutes
- 8DawsonSubstituted forHassellat 80'minutes
- 35BenayounSubstituted forPetrassoat 76'minutes
- 9AustinSubstituted forKeaneat 57'minutes
- 3TraoreSubstituted forKranjcarat 57'minutes
- Kevin Wright
- Shots on Target
Second Half ends, Barnsley 2, Queens Park Rangers 3.
Offside, Queens Park Rangers. Michael Petrasso tries a through ball, but William Keane is caught offside.
Corner, Queens Park Rangers. Conceded by Luke Steele.
Attempt saved. Michael Petrasso (Queens Park Rangers) right footed shot from the right side of the box is saved in the centre of the goal. Assisted by Niko Kranjcar.
Attempt missed. Karl Henry (Queens Park Rangers) right footed shot from more than 35 yards is high and wide to the left.
Goal! Barnsley 2, Queens Park Rangers 3. Chris O'Grady (Barnsley) right footed shot from outside the box to the bottom right corner. Assisted by Danny Rose.
Attempt missed. Danny Rose (Barnsley) header from the centre of the box is too high. Assisted by James Bree with a cross.
Foul by Coll Donaldson (Queens Park Rangers).
Danny Rose (Barnsley) wins a free kick in the defensive half.
Offside, Queens Park Rangers. Niko Kranjcar tries a through ball, but William Keane is caught offside.
Corner, Queens Park Rangers. Conceded by James Bree.
Attempt blocked. Niko Kranjcar (Queens Park Rangers) right footed shot from outside the box is blocked.
Niko Kranjcar (Queens Park Rangers) wins a free kick in the attacking half.
Foul by Jim O'Brien (Barnsley).
Substitution, Barnsley. Robert Hassell replaces Stephen Dawson.
Attempt saved. Dale Jennings (Barnsley) right footed shot from the right side of the box is saved in the centre of the goal. Assisted by Chris O'Grady.
Attempt blocked. William Keane (Queens Park Rangers) left footed shot from the centre of the box is blocked. Assisted by Gary O'Neil.
Attempt blocked. Kevin Doyle (Queens Park Rangers) right footed shot from outside the box is blocked. Assisted by Michael Petrasso.
Substitution, Queens Park Rangers. Michael Petrasso replaces Yossi Benayoun.