Match ends, AFC Wimbledon 2, York City 1.
Jack Smith's last-gasp volley earned Wimbledon victory over York, who are left only two points above the League Two relegation zone.
The Dons went ahead when Adedeji Oshilaja headed his first senior goal from George Francomb's corner.
Jake Hyde scrambled the equaliser just before the break after Joe McDonnell failed to hold Emile Sinclair's cross.
Sinclair later squandered an easy chance and York paid the price when Smith scored from the edge of the box.
The win puts Wimbledon just six points outside the play-off places, while York are left only three places and two points above the relegation places.
AFC Wimbledon manager Neal Ardley told BBC London 94.9:
"It was a really tough game and the pitch is really causing us problems at the moment - it's the worst it's been.
"Everything, when we play at home at the moment seems to be a scrap.
"I want to entertain, I want the fans to go 'wow, we were good', like the first half at Luton. But today it was really hard to. I don't like making excuses, but the pitch doesn't allow you to play free-flowing football.
"We've got to learn to scrap, which isn't something we're normally brilliant at. Today we scrapped and scrapped and stayed in the game, then had a great moment late on."
York City manager Russ Wilcox told BBC Radio York:
"I'm gutted for the players and the supporters who have been outstanding.
"It's a very cruel game. Last minute and again everyone will talk about last minute goals this season but what do you do about that? It's down to having that little bit of luck that for me over 90 minutes hasn't gone our way.
"It was a horrible game on a horrible pitch and I thought we played well and did the basics well in general.
"I have to pick the players up and go again next week in the huge game with Carlisle."
Line-ups
Wimbledon
Formation 4-4-2
- 26McDonnell
- 2Fuller
- 40Oshilaja
- 15Phillips
- 3Smith
- 7Francomb
- 19Reeves
- 4Bulman
- 35PotterSubstituted forRiggat 62'minutes
- 10AkinfenwaBooked at 72mins
- 14AzeezSubstituted forTannerat 78'minutes
Substitutes
- 1Worner
- 8Moore
- 11Rigg
- 17Kennedy
- 27Tanner
- 30Fitzpatrick
- 32Sweeney
York
Formation 4-4-2
- 31Olejnik
- 2McCoyBooked at 76mins
- 15Lowe
- 38Zubar
- 28Benning
- 7Coulson
- 10Penn
- 17Halliday
- 12CarsonSubstituted forMeikleat 86'minutes
- 9FletcherSubstituted forSinclairat 14'minutes
- 39Hyde
Substitutes
- 3Ilesanmi
- 5McCombe
- 14Montrose
- 18Platt
- 20Meikle
- 24Ingham
- 29Sinclair
- Referee:
- Gary Sutton
- Attendance:
- 4,086
Match Stats
- Possession
- Home45%
- Away55%
- Shots
- Home13
- Away10
- Shots on Target
- Home6
- Away5
- Corners
- Home9
- Away3
- Fouls
- Home17
- Away6
Live Text
Post update
Full Time
Second Half ends, AFC Wimbledon 2, York City 1.
Post update
Attempt saved. Michael Coulson (York City) header from the centre of the box is saved in the centre of the goal.
Post update
Attempt saved. Sean Rigg (AFC Wimbledon) right footed shot from the centre of the box is saved in the centre of the goal.
Goal!
Goal! AFC Wimbledon 2, York City 1. Jack Smith (AFC Wimbledon) right footed shot from outside the box to the top left corner.
Post update
Foul by Mark Phillips (AFC Wimbledon).
Post update
Keith Lowe (York City) wins a free kick in the attacking half.
Post update
George Francomb (AFC Wimbledon) wins a free kick in the defensive half.
Post update
Foul by Malvind Benning (York City).
Post update
Foul by Adebayo Akinfenwa (AFC Wimbledon).
Post update
Russell Penn (York City) wins a free kick in the attacking half.
Substitution
Substitution, York City. Lindon Meikle replaces Josh Carson.
Post update
Corner, AFC Wimbledon. Conceded by Russell Penn.
Post update
Corner, AFC Wimbledon. Conceded by Keith Lowe.
Substitution
Substitution, AFC Wimbledon. Craig Tanner replaces Adebayo Azeez.
Post update
Attempt saved. Mark Phillips (AFC Wimbledon) header from the centre of the box is saved in the top centre of the goal.
Booking
Marvin McCoy (York City) is shown the yellow card.
Post update
Adebayo Azeez (AFC Wimbledon) wins a free kick in the defensive half.
Post update
Foul by Marvin McCoy (York City).
Post update
Attempt missed. Adebayo Akinfenwa (AFC Wimbledon) right footed shot from the centre of the box misses to the right.