Amine Bassi scored twice as Barnsley climbed off the bottom of the Championship for the first time since the start of the year with a home win over play-off hopefuls Middlesbrough.
Bassi provided the chip into the box for Mads Andersen to give Barnsley an early lead and then netted his first for the club from Carlton Morris' lay-off.
Fielding an unchanged team for the first time in 27 league games, the Tykes showed a self-belief belying their position in the table and Bassi shrugged off Anfernee Dijksteel's challenge to make it 3-0 after the break.
Andraz Sporar pulled one back from the spot after Isaiah Jones was fouled and Liam Kitching's own goal further reduced the deficit with seconds remaining.