Two goals in five first half minutes sent North End on the way to their first win at the New York Stadium.
Strike partners Jordan Hugill and Callum Robinson both headed goals from left wing crosses, five minutes apart from one another, inside the first half hour, to put the Lilywhites ahead.
The home side pulled a goal back through captain Richard Wood, but substitute Marnick Vermijl sealed the win for Simon Grayson’s men with a close range strike with just under ten minutes to go.
The yellows started at a high tempo and the returning Aiden McGeady, back into the side for the suspended Ben Pearson, put over a cross from the right hand side on seven minutes that went through into the six yard box and somehow Callum Robinson got the ball caught under his feet when unmarked in front of goal.
The home side had a rare shot on goal a quart of an hour in when their top scorer Danny Ward shot from 25 yards when he had the ball in left hand channel, but the arrowed striker was well saved by Chris Maxwell and Greg Cunningham was fouled in the follow up by Jon Taylor.
The opener came at the first half’s midpoint as some great build up play involving Gallagher and former Miller Ben Pringle eventually lead to Greg Cunningham having space to cross from the left, where he landed the ball perfectly onto the penalty spot where Hugill headed powerfully in off the right hand post.
And within five minutes it was two. This time Pringle zipped the ball from the middle of the pitch out to McGeady on the left, before he tore open the Rotherham defence, leaving Darnell Fisher turned inside out before his clipping a ball across for Callum Robinson to head past Lee Camp into the centre of the goal to double the yellows’ lead.
Hugill was forced off with an injury ten minutes into the second, but on the hour mark his replacement Simon Makienok tested Camp with a low shot after Pringle’s lay off following a strong run and crossfield ball from Cunningham down the left.
Robinson then missed a gilt-edged chance to make it three when McGeady again shot from the left hand corner of the box that Camp could only parry into the path of the unmarked striker on the edge of the box, but the No.37’s shot was high and into the PNE fans behind the goal.
But with 19 minutes to go the home side grabbed a lifeline when the ball was swung in by substitute Peter Odemwingie from the left and skipper Richard Ward flicked a header into the bottom right hand corner from 12 yards out to halve the deficit.
The yellows weren’t perturbed though and were back two ahead with nine minutes left. Daniel Johnson collected the ball in his own half and he drove down the left hand side, a 50 yard lung-bursting effort all the way to the byline and drilled the ball across, left by everyone except substitute Marnick Vermijl, who blasted past Camp into the bottom right hand corner from close range, much to the delight of the 1,559 who had not stopped singing all afternoon.
The four minutes of injury time almost saw another substitute Jermaine Beckford add a fourth, when he got on the end of a cross from Johnson from the left, but it flashed across goal as the fans awaited the final whistle and three more valuable points.
Rotherham United line-up: Camp, Mattock, Vaulks, Wood (c), Ward, Taylor (Brown, 76), Ball (Halford, 46), Fisher, Fry, Blackstock (Odemwingie, 46), Newell. Subs not used: Price, Kelly, Forde, Belaid.
PNE line-up: Maxwell, Baptiste, Cunningham, Gallagher, Clarke (c), Wright, McGeady (Beckford, 89), Robinson, Hugill (Makienok, 55), Pringle (Vermijl, 77). Subs not used: Lindegaard, Doyle, Grimshaw, Huntington.
Attendance: 10,013 (1,559 PNE fans)
Referee: Mr A Woolmer