Match ends, Accrington Stanley 3, York City 2.
Jackie McNamara suffered defeat in his first game as York manager as Accrington progressed to the second round of the FA Cup.
Sean McConville shot in off the post to put Stanley ahead but Vadaine Oliver soon tapped in to level.
Matt Crooks fired Accrington back in front after a stunning solo run, before Josh Windass secured victory from the spot after Billy Kee was fouled.
Michael Coulson's header late on was only a consolation for City.
York City manager Jackie McNamara told BBC Radio York:
"I thought some things were pleasing but from my point of view I thought the goals we lost were very poor. They were too easy.
"You can understand why we haven't won in 10.
"From middle to front we look a threat when we do things properly and quickly but defensively I think we play as individuals which we need to sort out quickly."
Line-ups
Accrington
Formation 4-4-2
- 33Mooney
- 34Halliday
- 15Wright
- 5Davies
- 2Pearson
- 7Mingoia
- 14Crooks
- 28Conneely
- 11McConville
- 29KeeBooked at 73mins
- 8WindassSubstituted forGornellat 88'minutes
Substitutes
- 1Etheridge
- 4Barry
- 6Proctor
- 10Gornell
- 12Wakefield
- 16Quansah
- 17McCartan
York
Formation 4-3-3
- 1Flinders
- 2McCoy
- 15LoweSubstituted forWinfieldat 45'minutesBooked at 74mins
- 3IlesanmiBooked at 61mins
- 6Nolan
- 20Collins
- 26GodfreySubstituted forTurnerat 77'minutes
- 12Morris
- 29SinclairSubstituted forHydeat 59'minutes
- 9OliverBooked at 28mins
- 7Coulson
Substitutes
- 13Straker
- 14Swan
- 16Winfield
- 19Hyde
- 23Turner
- 24Ingham
- 27Tutonda
- Referee:
- Fred Graham
- Attendance:
- 1,475
Match Stats
- Possession
- Home49%
- Away51%
- Shots
- Home18
- Away14
- Shots on Target
- Home8
- Away7
- Corners
- Home5
- Away5
- Fouls
- Home6
- Away13
Live Text
Post update
Full Time
Second Half ends, Accrington Stanley 3, York City 2.
Post update
Femi Ilesanmi (York City) wins a free kick on the right wing.
Post update
Foul by Billy Kee (Accrington Stanley).
Post update
Foul by Femi Ilesanmi (York City).
Post update
Billy Kee (Accrington Stanley) wins a free kick in the defensive half.
Goal!
Goal! Accrington Stanley 3, York City 2. Michael Coulson (York City) header from the right side of the six yard box to the bottom right corner. Assisted by Rhys Turner.
Post update
Attempt missed. Sean McConville (Accrington Stanley) right footed shot from the left side of the box is just a bit too high.
Post update
Piero Mingoia (Accrington Stanley) wins a free kick on the left wing.
Post update
Foul by Vadaine Oliver (York City).
Substitution
Substitution, Accrington Stanley. Terry Gornell replaces Josh Windass.
Post update
Foul by Michael Collins (York City).
Post update
Sean McConville (Accrington Stanley) wins a free kick in the defensive half.
Post update
Foul by Eddie Nolan (York City).
Post update
Josh Windass (Accrington Stanley) wins a free kick on the right wing.
Post update
Attempt saved. Dave Winfield (York City) header from the left side of the six yard box is saved in the top left corner.
Post update
Corner, York City. Conceded by Tom Davies.
Post update
Corner, York City. Conceded by Brad Halliday.
Post update
Attempt missed. Brad Halliday (Accrington Stanley) right footed shot from outside the box is close, but misses to the right.
Post update
Attempt missed. Matt Crooks (Accrington Stanley) right footed shot from outside the box is too high.