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."
Rotherham 01 Shearer 03 Skarz (Eaves - 85' ) 04 Arnason Booked 14 Bradley 20 Morgan 08 Frecklington Booked 15 Milsom Booked 18 Pringle Booked 22 Agard (Tubbs - 78' ) 09 Revell 17 Nardiello Substitutes 21 Collin 02 Brindley 06 Mills 31 Rowe 23 Tidser 16 Tubbs 25 Eaves Peterborough 01 Olejnik 02 Alcock 05 Zakuani 06 Bostwick 14 Rowe 07 Swanson (Kearns - 64' ) 08 Payne 11 McCann 12 Taylor (Newell - 77' ) 09 Assombalonga 23 Barnett Substitutes 13 Day 03 Ntlhe 04 Brisley 16 Kearns 17 Newell 18 Ferdinand 19 Mendez-Laing