Barnet manager Edgar Davids hailed his side after they came from behind to gain a valuable three points in their battle against relegation with a 2-1 win at York.
The Bees suffered an early setback through Michael Rankine's opener, although David Stephens may have got the final touch to turn the ball into his own goal, but strikes from Andy Yiadom and Jake Hyde sealed the win that moved them two points clear of the drop zone and into 20th place in the table.
"I'm very pleased, sometimes you have to win ugly," said Davids. "We started off not very sharp and after that we controlled the game. Second half we didn't control the game but we showed character and sometimes when you don't have the ability to play the ball, like we did the last three games, then you have to switch to another mode and luckily we did.
"They started off very well and we got punished. The pitch was slippery and wobbly but they had the same problems so there is no excuse from either team.
"The goal before half-time was very important. If not then they would have had more confidence and they can rest and you have to go bomb on forward looking for the goal. With the goal we had an equal opportunity and luckily we got the win. I'm very happy the spirit is like this at the moment."
York manager Gary Mills was critical of his side as they suffered another defeat.
He labelled his side as "sloppy" and insisted they need to stop giving away easy goals.
"It's another blow for us," he said. "It's another game we've lost, we're not winning football matches and it's another game we've lost to an opponent lower than us.
"We've got a throw-in in front of our dugout and within seconds it's in the back of my net. It's as simple as that. You can't be giving goals away like that and we've been giving goals away for quite a few weeks now. We've not scored a lot of goals in abundance and we know that's a problem, but when you're conceding goals like we are doing at this time it's going to make it very difficult for ourselves.
"It's got to be so much better and we can't give goals away at this level of football and expect to get away with it. We're getting punished in a big way at the moment and deservedly so because you can't be sloppy like that."