Batley stayed on course for a third place finish in the Championship Shield after condemning Rochdale to the drop.
Alex Rowe gave Batley the lead with a try from Ali Leake’s pass, with Dave Scott adding the goal.
Then Johnny Campbell collected Louis Jouffret’s kick to make it 10-0 and Bulldogs seemed in control.
But Rochdale weren’t going to surrender their Championship status easily and hit back with a pair of tries for winger Deon Lewis-Cross and one for Jack Fox and although none were converted, they led 12-10.
But Patch Walker created a try for Adam Gledhill. which Walker also converted, before late touchdowns for Wayne Reittie and Sam Smeaton sent Hornets down.
Fourth-placed Dewsbury Rams also shared the tries around as they saw off visiting Barrow Raiders 32-12.
Adam Ryder scored a brace of tries, with Rob Worrincy, Lucas Walshaw, Aaron Brown and Brad Delaney also crossing, with former England international Paul Sykes landing four goals.