Promotion-chasing Rotherham's six-game unbeaten run came to an end with defeat against Dagenham and Redbridge.
The visitors went in front when Medi Elito was fouled in the box by Kari Arneson, who was shown the red card.
Elito picked himself up to convert the penalty, only for Claude Davis to level things with a close-range header from a David Noble corner.
Daggers got the vital winner late on when Matthew Saunders pulled the ball back and Luke Wilkinson crashed home.
VIEW FROM THE DRESSING ROOM
Rotherham United manager Steve Evans told BBC Radio Sheffield:
"I think you have to give credit to Dagenham who have defended with their lives.
"We've done more then enough to win three games today.
"But you only win games if you put the ball in the net and it's hard to take.
"They've nicked a win - that's the bottom line - that's what they've done. They'll never nick three points like that again."
Sorry, we were unable to load match stats, please try again.