With three games left, Cowdenbeath’s safety in Ladbrokes League One is very much in their own hands but City face a real scrap to avoid relegation.
The 2-1 win on Saturday moved Cowden up to seventh, six ahead of bottom side City and four in front of second from bottom Forfar Athletic.
City were a goal down inside 40 seconds, Greig Spence profiting after Brechin keeper Graeme Smith could not hold Lewis Milne’s 18-yarder.
Thereafter the Glebe Parkers had a lot of the ball but did not work home goalkeeper Grant Adam enough.
Lewis Spence tucked away the equaliser in 68 minutes.
However, six minutes from time the visiting defence failed to pick up Chris Kane at a Declan Hughes corner, and the midfielder headed past the stranded Smith to give the home side a win which eased their survival worries.
Blues player/boss Colin Nish said: “How we get it is not important as long as we win and, to be honest, we did not play well.
“The heavy pitch did not assist either side but Brechin seemed to get a grip of the midfield despite us scoring in the first minute, and that was why I made a couple of substitutions before the interval.
“We needed to compete in the central area and I felt Chris Kane and Kyle Miller gave us that extra dig, and of course Chris grabbed the winner.”
City manager Darren Dodds felt his team’s finishing let them down, but praised them for the way they responded to losing a first-minute goal.
He said: “To have so much of the game and lose is a real kick in the teeth, but the lads showed that if we keep showing the same work rate in our closing three fixtures we can get the results we need to stay up.
“We must look to win all three of these, and we can do it.”