Wilcox was dismissed in October 2015 after a nine-match run without a win left York 21st in the table, and was succeeded by the former Dundee United manager Jackie McNamara in November. York went on a run of one win from the last 16 fixtures, and were relegated to the National League after finishing bottom of League Two in 2015–16. This marked the end of York's four-year return in the Football League. With the team 19th in the National League, Gary Mills was reappointed manager in October 2016, shortly after he was dismissed by Wrexham. McNamara remained at the club after taking on the role of chief executive. Mills was unable to stop York being relegated to the National League North for the first time in 2016–17, although they did beat Macclesfield Town in the 2017 FA Trophy Final. Mills was dismissed in September 2017, with York seventh in the National League North and 11 points away from the only automatic promotion place. He was succeeded by Darlington manager Martin Gray, who led York to an 11th-place finish in 2017–18. He left in August 2018 when his contract was not renewed, with the team eighth in the table after five matches.