Jackie McNamara suffers defeat in his first game as York manager as Accrington win 3-2 to progress 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, with Michael Coulson's header late on was only a consolation for City.
Watch every goal from the FA Cup first round here.
Available to UK users only.