Winning at home has been difficult for Rotherham United this season, but three points cannot often been harder than this for them at the New York Stadium.
Had they given the scoreline their play merited in a dominant first half, the second would have been irrelevant.
As it was, the Millers were made to sweat hard for the victory, all the harder when the previously-brilliant Chiedozie Ogbene picked up his second yellow card of the afternoon.
Home has not been where the heart is for Rotherham this season but for the last three weeks, it is not where the team has been either. They did not look to have any hang-ups on their return.
It took just 34 seconds for Rotherham to lay a marker, Carlton Morris forcing a good save from Dimitar Evtimov.
Generally, though, it was the pace of Ogbene which allowed the Millers to dominate. Evtimov could quickly see which way the wind was blowing, wasting time over his goal-kick when the match was barely a quarter of the way through.
There were 20 minutes gone when Ogbene showed Joe Maguire a clean pair of heels, only to float the ball beyond both the far post and any of his team-mates.
Three minutes later, the winger popped up on the left, and it took a Callum Johnson foul to bring him to a halt, at the cost of a booking.
Seamus Conneely was very fortunate not to suffer the same fate when he wrestled Ogbene to the ground near the corner flag on the right, but the Millers punished him anyway, Morris running onto Ben Wiles's free-kick and heading in.
Even when Ogbene was under wraps, Accrington had Matthew Olosunde to think about, and the the right-back produced a cross Michael Smith headed at the goalkeeper.
As well as their speed on the counter-attack, Rotherham were by now showing great confidence in tight situations and the 36th minute showcased both, Daniel Barlaser wriggling into position to measure a gorgeous pass. Matt Crooks, like Barlaser and Michael Ikiehwe a former Stanley player, ran onto it and when he took the ball around Evtimov, the keeper tripped him. That Evtimov was the best part of 30 yards out, and that there were defenders around kept the damage to a yellow card, but it further infuriated the home fans annoyed with the decision-making which saw Darren Handley write two names from either side into his notebook in the first half.
When Morris curled his stoppage-time beyond the far post, it denied the Millers the half-time breathing space their football deserved.
Accrington did not have a shot on target in the opening 45 minutes.
They were never going to be as poor in the second half. They were not.
No doubt after some choice words, John Coleman sent his men out early and made a half-time change. It all had the desired effect, with central midfielder Sam Finley taking control of the game.
Substitute Sean McConville's header was deflected wide and Maguire's shot when the subsequent corner came out to him was also off target.
When Crooks threatened the opposite goal, Ross Sykes put in a brilliant tackle and Clark Robertson headed wide at the corner.
Ogbene looked like he might lift his side, Wiles stinging the goalkeeper's palms at the end of another of his electric runs, but a minute later the winger was booked for pulling back his man. It would be more significant than it looked.
Ogbene was at it again a few minutes later, sprinting away as his side counter-attacked from a McConville free-kick, only for his cross to go out of play before coming back in.
It looked like Rotherham were regaining a foothold, Morris's cross beaten away and Crooks's pass just in front of Smith, but it was only a respite, as Finley's two fierce shots just over showed.
If the pressure was great then, it cranked up in the 82nd-minute when the already deeply unpopular Handley booked Ogbene for diving.
Maguire and McConville both went close to making Accrington's numerical advantage count, but the Millers just about held on for a victory which put them sixth in League One.
Rotherham United: Iversen; Olosuende, Ihiekwe, Robertson, Jones; Wiles, Barlaser; Ogbene, Crooks (Lindsay 76), Morris (Thompson 88); Smith (Ladapo 76).
Unused substitutes: Price, Vassell, Clarke, Hastie.
Accrington Stanley: Evtimov; Johnson, Sykes, Rodgers, Maguire (Carvalho 88); Finley, Barclay (Bishop 77), Clark, Conneely, Pritchard (McConville 46); Charles.
Unused substitutes: Savin, Edwards, Zanzal, Savin, Diallo.
Referee: D Handley (Lancashire).