Peterborough United closed the gap on League Two leaders Leyton Orient as Grant McCann's penalty consigned Rotherham to a first league defeat.
Daniel Nardiello should have scored for the Millers but shot over after Bobby Olejnik saved from Robert Milsom.
Shortly after the break Kari Arnason handled in the area and McCann converted from the spot.
Rotherham squandered chances, with Mark Bradley the most wasteful when heading wide and missing a late sitter.
Posh are now three points behind the O's, who drew with Walsall, and above third-placed Wolves on goal difference.
Rotherham have been edged out of the play-off places by MK Dons.
VIEW FROM THE DRESSING ROOM
Rotherham United manager Steve Evans told BBC Radio Sheffield:
"It's hard to take (the penalty decision), we have to take the positives. I think that team (Peterborough) will get promoted, they'll be champions.
"We're disappointed tonight and so you should be. But you can be proud of your team's performance, it was full of energy.
"We missed a host of chances and you'll always pay a price if you don't take those chances."
Peterborough United boss Darren Ferguson told BBC Radio Cambridgeshire:
"That's two weeks on the bounce teams have been unbeaten until they've played us, but it's all about how many points we get.
"Over the course of the season you're not going to play great football every week. What I do know is I've got a bunch of lads who are so determined to win games of football.
"The plus points are the fact that we dug in and we got the three points, that's the main factor from today.
"Lee Tomlin will be out for four to six weeks but we've got Paul Taylor and others that we can use."