Yannick Bolasie scored a last-minute winner as Barnet eased their relegation fears against promotion chasing Rochdale at Underhill.
The on-loan Plymouth man squeezed home from the edge of the area after Lee McEvilly had cancelled out John O'Flynn's strike late in the first half.
Barnet started the game well and should have taken the lead after just 11 minutes following some great work down the right by Albert Adomah.
His low cross picked out O'Flynn but his effort was well saved by Rochdale keeper Frank Fielding and the Irish striker fired the rebound against the bar.
The visitors were struggling to get into the game and found themselves restricted to a couple of long range efforts from Adam Le Fondre.
The Bees went close again midway through the first half but Fielding, on loan from Blackburn Rovers, did well to turn aside Nicky Deverdics' skimming drive.
And Fielding did well again ten minutes later as he parried Matt Lockwood's free kick before blocking the subsequent follow-up from the evergreen former Chelsea striker Paul Furlong.
Barnet got the goal they deserved three minutes before half time as Neal Bishop slid the ball through for O'Flynn who slotted home his 12th of the season.
But in first half stoppage time the visitors were level as McEvilly helped Le Fondre's goal-bound header over the line.
Both teams had chances to go in front in the second half, but Fielding did well to keep out an effort from Adomah and substitute keeper Ran Kadoch blocked well from Le Fondre and then from Adam Rundle.
With 10 minutes to go Rochdale were reduced to ten men when substitute Chris Dagnall was sent off for a dangerous challenge on Bishop.
And Barnet took full advantage in stoppage time when Bolasie cut in from the left and somehow found a gap beyond Fielding to end Rochdale's four game winning run on the road.