Three second-half goals gave Morecambe their best away win of the season.
Jim Bentley’s side crushed York with two late goals from Jack Redshaw giving the Shrimps their second successive away win and moving them even further away from the danger area.
The Shrimps started well and Kevin Ellison went close in the opening stages.
Ryan Williams, making his first Morecambe start, played him in behind the York defence with a neat through ball but his effort was superbly blocked by Michael Ingham.
The visitors’ pressure paid off on 22 minutes however when they took the lead. Stewart Drummond swung in a deep cross from the right, Ellison headed back across goal and Lewis Alessandra ghosted in behind Daniel Parslow to volley the loose ball past Ingham from six yards.
The lead lasted just five minutes as York were gifted the softest of penalties when the referee spotted some pushing at a York corner and Jason Walker blasted the penalty straight down the middle and past Barry Roche.
The second half saw both sides trade chances before Ellison gave the Shrimps the lead when he took advantage of a mistake from home keeper Ingham to slot the ball into the empty net on 74 minutes.
As the home side pushed for a leveller they left gaps at the back and Morecambe took full advantage with Redshaw bagging a brace.
His first came on 87 minutes when Ingham saved well from Ellison only for the ball to fall perfectly for the diminutive forward to score from close range.
The young striker then added a fourth in the third minute of injury time when Ellison produced a superb through ball for Redshaw to run on goal and score calmly.
York: Ingham, Obeng, O’Connell, Smith, Parslow, Blair, Kerr, Rodman (McReady 81), Potts (McDaid 67), Walker, McLaughlin (Fyfield 81). Subs not used Musselwhite, McGurk, Reed, Challinor.
Morecambe: Roche, Parrish, Fenton, McCready, Haining, Drummond, McDonald, Williams, Alessandra (Redshaw 70), Holroyd (Burro 90), Ellison. Subs not used: Arestidou, Mwasile, McGowan, Doyle, Reid.
Referee: R Clark.