Akpo Sodje snatched his fourth goal in five games as Sheffield Wednesday sank their South Yorkshire rivals in a thrilling Hillsborough derby.
The 26-year-old striker, a £250,000 summer signing from Port Vale, struck in the 61st minute with a close-range header from Burton O'Brien's free-kick to extend their unbeaten run to six.
Barnsley, chasing their first win at Hillsborough in 24 years and fresh from a 3-2 win over league leaders Watford, soaked up early pressure with Jermaine Johnson testing German keeper Heinz Muller.
The winger saw one shot from the edge of the area blocked by Dennis Souza and another strike took a wicked deflection with Muller scrambling back as the ball spun inches over the top.
Barnsley almost snatched the lead in the 17th minute as the lanky Souza stretched to meet a Brian Howard corner only for Lee Grant to pull off a stunning save to push the Brazilian defender's close-range header over the bar.
Howard showed his class minutes later by turning past his marker to lash in a right-foot shot from 16 yards which flashed wide of the far post.
Wednesday were handed a half chance when Sodje raced onto Souza's tame back pass but Muller charged out of his area to get the first touch and hack the ball to safety.
Frank Simek almost found a way through for the Sheffield side with a darting run before unleashing a low angled strike from the edge of the area which was palmed around the post in spectacular fashion by Muller as Wednesday upped the pace.
Barnsley escaped in the 46th minute as O'Brien pumped in a low cross from the right flank.
Full-back Dominic Werling tried to chest the ball back to his keeper but miscued and hit the post as Muller bravely dived at the feet of Marcus Tudgay..
But Sodje struck clinically on the hour as the home fans celebrated, before Barnsley substitute Kayode Odejay squandered a chance to level matters by powering his close range header over the top in the closing stages.