Rochdale 2Â Doncaster Rovers 3
Ali Crawford and Jermaine Anderson both grabbed their first goals for Rovers, sandwiching an Andy Butler header in what was a frenetic football match at the Crown Oil Arena with James Coppinger providing the assist for all three strikes.
Ian Henderson scored from the spot and Kgosi Ntlhe netted as Rochdale twice pulled goals back but they could never wrestle their way level.
It was a victory which required a tremendous amount of hard work and endeavour, spending plenty of time on the back foot against a strong Rochdale outfit who had glorious opportunities to take something from the game.
The opening to the game was even but played at a frantic pace with both sides looking for swift, sharp passing as well as playing a hard pressing game.
John Marquis and Alfie May both had good chances for Rovers while Brad Inman and Ian Henderson both went close for the hosts.
Kgosi Ntlhe was inches away from heading Rochdale in front when he rose unmarked at the back post. But moments later, Rovers went in front.
Matty Blair charged from half way and fed James Coppinger who hit the byline and pulled back to Crawford on the edge of the area. The Scottish midfielder struck first time with a whipped finish into the top corner.
Rochdale responded well to falling behind and pushed hard for an equaliser with Henderson turning an effort just wide while Zach Clough drew a stunning save from Marko Marosi with a powerful drive.
Then came the miss of the season. Inman latched onto a short backpass from Danny Andrew and squared to Henderson, who saw his initial effort blocked by Niall Mason and sent his follow up onto the bar from four yards with the goal at his mercy.
For all Rochdale's pressrure and Rovers' fortune, the visitors almost went in at the break with a two goal lead as John Marquis struck a first time effort off the post.
But five minutes into the second half they did find a cushion when Butler shook off the attention of Ntlhe and powered home a header from a Coppinger corner.
Eight minutes later, Rochdale were gifted a way back into the game when Marquis bundled over Ntlhe with referee Scott Oldham pointing to the spot. Henderson stepped up and slammed into the bottom corner.
Marosi somehow managed to keep out MJ Williams' deflected effort as Rochdale pushed for an equaliser.
But Rovers edged back into a two goal advantage on 68 minutes when Coppinger dug out a cross and substitute Anderson slid in to poke home at the back post.
The drama was far from over as Rochdale pulled another goal back eight minutes from time when Ntlhe hooked in from close range.
There was a nervy finish but Rovers held firm under Rochdale's desperate play to earn the win.
Rochdale: Lillis; Rafferty, McGahey, Ntlhe, Hart (Cannon 58); Perkins (Andrew 57); MJ Williams (Dooley 72), Clough; Rathbone; Inman, Henderson. Subs not used: McNulty, J Williams, Moore, Morley.
Rovers: Marosi; Mason, Wright, Butler, Andrew; Crawford (J Anderson 60), Whiteman, Blair; May (Wilks 71), Marquis, Coppinger (Taylor 80). Subs not used: Lawlor, T Anderson, Horton, Beestin.
Referee: Scott Oldham (Lancashire)
Attendance: 3,600 (754 away)