York gave themselves a lifeline in their battle to avoid relegation with victory over Southend.
The hosts went ahead after two minutes when a deflection in the area fell to Adam Reed, who fired home.
A poor clearance from Jack O'Connell led to Ryan Leonard equalising for the Shrimpers, but Matty Blair blasted in to earn a win for the Minstermen.
York are two points above the drop zone, with their final game to come against fellow strugglers Dagenham.
The Daggers, who lost 1-0 to bottom club Aldershot, sit one point and one place below in 21st.
The defeat ended Southend's slim chances of making a late play-off charge.
VIEWS FROM THE DRESSING ROOM
York City manager Nigel Worthington told BBC Radio York:
"It was a battling performance; you've got to show character in that side of the game and we got that into the play.
"As I said before the game, we had to keep going for the 90 minutes and I think it was Chris Smith who cleared one off the line at the end - it's important that we do the right things.
"Credit to the players they have given it a go and are doing what we've asked."
Southend United manager Phil Brown told BBC Essex:
"I didn't think we attempted to play any kind of football. We played with a kind of route one mentality. It just wasn't good enough.
"The first goal was a long throw, the second goal they had three in our penalty box and we had eight and we still didn't defend it.
"When you are going to defend like that, I don't think you deserve to win any football games.
"We were found wanting in the battle. We get the ball down and play on the training ground, and then you come on a Saturday and you don't play. I wouldn't like to watch that every week."
- 24 Ingham
- 02 Oyebanjo
- 04 Smith
- 05 McGurk
- 22 O'Connell
- 06 Parslow
- 18 Platt Booked
- 37 Reed Booked (Challinor - 56' )
- 09 Walker (McDaid - 87' )
- 10 Chambers
- 17 Blair (Coulson - 88' )
- 01 Jameson
- 16 Fyfield
- 13 McDaid
- 20 Challinor
- 26 McLaughlin
- 11 Coulson
- 27 Allen
- 17 Bentley
- 02 Clohessy
- 03 Straker
- 06 Cresswell Booked
- 16 Prosser
- 12 Lund
- 18 Leonard
- 26 Laird (Tomlin - 52' )
- 07 Eastwood
- 10 Corr
- 20 Assombalonga (Hurst - 69' )
- 01 Smith
- 04 Spillane
- 15 Phillips
- 23 Barker
- 14 Hurst
- 34 Pinnock
- 21 Tomlin
Live Text Commentary
Full Time The referee blows for the end of the match.90:00 +4:44
Barry Corr takes a shot. Michael Ingham makes a save.90:00 +4:23
Ryan Leonard takes a shot. Michael Ingham makes a save.90:00 +3:09
Michael Ingham takes the free kick.90:00 +3:09 Booking
Booking Ryan Cresswell goes into the referee's book for unsporting behaviour.90:00 +3:00
Unfair challenge on Daniel Parslow by Sean Clohessy results in a free kick.89:45
Gavin Tomlin challenges Lanre Oyebanjo unfairly and gives away a free kick. Chris Smith takes the direct free kick.86:36
Michael Ingham takes the indirect free kick.86:36 Substitution
Substitution Michael Coulson replaces Matty Blair.86:36 Substitution
Substitution David McDaid on for Jason Walker.86:36
The referee blows for offside against Gavin Tomlin.82:40
Unfair challenge on David McGurk by Barry Corr results in a free kick. Free kick taken by Michael Ingham.79:53
Jason Walker takes a shot. Save by Daniel Bentley.75:44
Ashley Chambers takes the outswinging corner, clearance made by Barry Corr.73:45
Ryan Leonard concedes a free kick for a foul on Jason Walker. Chris Smith takes the direct free kick.72:09
Daniel Bentley takes the free kick.72:09 Booking
Booking Tom Platt is shown a yellow card for unsporting behaviour.71:50
Foul by Tom Platt on Matthew Lund, free kick awarded.68:21 Substitution
Substitution Britt Assombalonga goes off and Kevan Hurst comes on.67:56
Headed effort from inside the area by Ryan Leonard misses to the right of the goal.
Freddy Eastwood produces a left-footed shot from the edge of the box and misses to the right of the target.62:40
Free kick awarded for a foul by Anthony Straker on Jason Walker. Michael Ingham restarts play with the free kick.62:02
Free kick awarded for an unfair challenge on Luke Prosser by Jason Walker. Free kick taken by Anthony Straker.61:38
Headed effort from deep inside the penalty area by Matty Blair misses to the right of the target.56:10
Unfair challenge on Matthew Lund by Jon Challinor results in a free kick. Matthew Lund restarts play with the free kick.55:04 Substitution
Substitution Adam Reed goes off and Jon Challinor comes on.53:53
Sean Clohessy produces a cross, Barry Corr takes a shot. Michael Ingham makes a save.51:29 Substitution
Substitution Gavin Tomlin comes on in place of Marc Laird.50:57
Header by Barry Corr from deep inside the penalty area misses to the left of the goal.47:47
Daniel Parslow concedes a free kick for a foul on Freddy Eastwood. Matthew Lund takes the direct free kick.45:01
The game restarts for the second half.45:00 +2:03 Half time
Half Time The first half comes to an end.44:38
The official flags Barry Corr offside. Free kick taken by Michael Ingham.44:01
Jason Walker takes a shot. Daniel Bentley makes a save.40:29
The assist for the goal came from Tom Platt.40:29 Goal scored
Goal! - Matty Blair - York 2 - 1 Southend Matty Blair finds the back of the net with a goal from inside the box to the top left corner of the goal. York 2-1 Southend.39:15
Ryan Leonard concedes a free kick for a foul on Matty Blair. Lanre Oyebanjo restarts play with the free kick.35:27 Booking
Booking The referee books Adam Reed for unsporting behaviour.28:43
Free kick awarded for an unfair challenge on Barry Corr by Daniel Parslow. Daniel Bentley restarts play with the free kick.26:46
Corner taken right-footed by Freddy Eastwood from the right by-line, Barry Corr produces a header from inside the area that goes over the bar.21:35 Goal scored
Goal! - Ryan Leonard - York 1 - 1 Southend Ryan Leonard scores a headed goal from just inside the edge of the penalty box. York 1-1 Southend.18:40
Adam Reed takes a shot. Save by Daniel Bentley.17:19
Barry Corr takes a shot. Michael Ingham makes a save.12:36
Unfair challenge on Jason Walker by Anthony Straker results in a free kick. The free kick is delivered left-footed by Jack O'Connell from right channel, save by Daniel Bentley.0:55
Assist on the goal came from Matty Blair.0:55 Goal scored
Goal! - Adam Reed - York 1 - 0 Southend Goal scored by Adam Reed from deep inside the penalty box to the top left corner of the goal. York 1-0 Southend.0:00
The referee gets the game started.
Live data and text provided by our data suppliers