David Ball struck twice in the last 15 minutes to snatch Rotherham their first win in eight league games with a 2-1 victory at Blackpool.
Kelvin Mellor gave Blackpool a half-time lead but Ball's late strikes mean the Seasiders are now winless in their last four.
The Seasiders were ahead in sensational fashion after 21 minutes with defender Mellor's third in three games. Viv Solomon-Otabor's cut-back rolled across the area and came to Mellor 25 yards out, who struck it with the outside of his boot and curled it in off the far post.
The Millers began the second half well and Clark Robertson was forced into two defensive blocks within the first seven minutes to deny Jerry Yates and then Ball.
Rotherham, who had lost their previous three in the league, were denied an equaliser by the woodwork after 69 minutes when Richard Wood's header came back off the crossbar.
But they were level after 76 minutes as Ball latched onto a long throw to smash home from six yards for his first league goal for the Millers.
And the striker snatched the winner three minutes from time as his near-post header from Anthony Forde's corner found the net.