A storming first-half performance saw York City register a very impressive away win at Spotlands.
York raced into a 3-0 lead at the break and then weathered the storm as Rochdale fought back.
Michael Potts opened his professional account with the opening goal on seven minutes for Gary Mills’s side.
And Jason Walker doubled the lead for the Minstermen on 19 minutes.
It kept getting better for York, and for Potts, who scored his second and City’s third on 37 minutes.
Rhys Bennett pulled a goal back for Rochdale on 61 minutes.
And Bobby Grant reduced the deficit even further with a penalty seven minute from time.
But the Minstermen hung on to claim the three points that sees them climb up to 14th in League Two.