Terry Gornell scored twice as Rochdale beat Bradford in a six-goal thriller.
Gornell put the Dale ahead from inside the area, only for Alan Connell to level from the penalty spot after he was bundled over by Ryan Edwards.
Andrew Tutte's strike gave the visitors the advantage once more and Ashley Grimes volleyed in for 3-1.
However Connell pulled one back from the spot again after Phil Edwards handled, before Gornell's header completed the scoring before half-time.
Rochdale continued to press, and Bobby Grant forced Matt Duke into a fine save when his shot looked to be heading for the top corner.
The Dale held on to end the Bantams' run of five league games without defeat.