Gary Mills was appointed first-team boss of the North Yorkshire club for a second time yesterday, before the surprising news that McNamara would be staying at Bootham Crescent was also announced.
York said in a statement: “York City Football Club has appointed Jackie McNamara as chief executive with immediate effect.”
The club said McNamara, pictured right, a former manager of Partick Thistle and Dundee United, would “focus on all operational aspects”.
Mills, 54, who won the European Cup with Nottingham Forest in 1980, will work closely with his predecessor.
Long-standing former members of the Football League, York spent eight years in non-league from 2004 to 2012, before Mills led the team to promotion through the play-offs.
York dismissed Mills during their first of four seasons back in League Two, before being relegated again to the Vanarama National last term. They are languishing in 19th place this season.
McNamara’s appointment was widely seen as a coup when York brought in the 42-year-old former Scotland defender last November. However, the team failed to win an away match under his charge, a major factor in their relegation and continuing problems in the fifth tier of English football.
Following a 6-1 defeat by Guiseley on 4 October, and amid calls for his sacking from many supporters, McNamara pledged to quit if York failed to gain a positive result in their next match at Braintree.
A 1-1 draw led to his departure two days later, but McNamara unusually stayed on as caretaker manager and oversaw a 1-1 home draw against Vanarama North side Curzon Ashton in the FA Cup fourth qualifying round on Saturday.
McNamara has had a close relationship with York chairman Jason McGill, and the pair met with Mills at a hotel on Saturday evening.
York said Mills will lead the team in the FA Cup replay on Monday, when the team will attempt to break a 30-match run without an away win.
A York statement added: “The club would like to ask the supporters to join them in welcoming Gary back to York City FC and to get behind him and the players.”