A last-minute goal condemned QPR to their first defeat of the season.
Tjaronn Chery and Sebastian Polter both scored for Rangers from the penalty spot, but Conor Hourihane made it 2-2 and Josh Scowen won it for Barnsley.
And Rangers ended the match with 10 men after Grant Hall was sent off for a second bookable offence in the final seconds.
The result ended QPR’s 100% start to the season and, having been so solid in their opening two matches, they looked much more vulnerable at the back this time.
Chery was again influential for them, hitting the bar and then equalising to cancel out Marley Watkins’ early goal.
Rangers looked to be heading for three points and a return to the top of the Championship when Polter put them ahead with 15 minutes remaining.
But Barnsley hit back immediately, with Hourihane’s left-footed free-kick bringing them level, and then the Tykes found a winner.
Rangers had made an awful start, going behind after just four minutes – the first league goal conceded by them this season.
Marc Roberts got his head to Hourihane’s corner and Watkins was able to head home unmarked.
But Chery, who struck the woodwork with a free-kick shortly before the interval, levelled less than a couple of minutes into the second half.
Polter was brought down by Roberts, who was fortunate not to be red-carded, and Chery calmly converted from the spot.
It was the Dutchman’s third penalty in as many league matches, yet when QPR’s fourth spot-kick of the campaign arrived when Yeni Ngbakoto was hacked down by James Bree, it was Polter who stepped up.
The German made no mistake, netting his second goal of the season.
But the lead quickly vanished – and worse followed for Jimmy Floyd Hasselbaink’s side.
Stefan Payne got the better of Hall – Rangers protested that the defender was fouled – and hooked the ball towards Scowen, who thumped past an exposed Alex Smithies.
Hall then allowed his frustration to boil over and was dismissed following a reckless challenge on Payne.
This post was last modified on 19/08/2016