Match ends, Rotherham United 2, Cardiff City 1.
Matthew Connolly's last-minute own goal helped Rotherham secure their first league victory of the season against 10-man Cardiff.
Vadis Odjidja-Ofoe's penalty put the Millers ahead after Cardiff keeper David Marshall was sent off for kicking out at Matt Derbyshire on 40 minutes.
But Peter Whittingham's fierce penalty after Farrend Rawson brought down Fabio levelled things before half-time.
Rotherham won it when Connolly turned Chris Maguire's cross into his own net.
Despite the victory Rotherham remain bottom of the Championship while Cardiff suffered their first defeat away from home in the league this season.
After a dour first 40 minutes the game exploded into life when visiting keeper Marshall lashed out at Derbyshire off the ball, getting himself sent off and conceding a penalty, which Odjidja-Ofoe tucked away for his first Millers goal.
Steve Evans's side could not take their lead into half-time though as Whittingham smashed home a spot-kick down the middle of the goal following Rawson's clumsy foul on Fabio.
The home side started brightly in the second-half as Jonson Clarke-Harris's half-volley was superbly saved by substitute goalkeeper Simon Moore.
Joe Newell's thunderous volley struck the post late on as Rotherham seemed destined to remain winless in the league, before Maguire's dangerous cross was inadvertently deflected into his own net by Connolly, sending the home crowd wild at a first three points of the season.
Rotherham United manager Steve Evans: "The win has been coming for me. I think if it would have been anything other than a win it would have been a travesty. We've been the best side by a million miles from the first minute.
"I thought we were battering them at 11 versus 11. They showed no interest in going forward in the second half and were camped behind the ball. The question was in the second half could we get the goal that our momentum deserved? You think it's not going to be our day.
"I think we were fantastic. We beat a top side full of quality players. We gave them a bit of a hiding."
Cardiff City manager Russell Slade on David Marshall's red card: "It's clearly a free-kick to ourselves because the player (Derbyshire) has pulled David Marshall and then David has lashed out. So yes it is a sending off - but it's not a penalty, it's a free-kick to ourselves.
"Should we have been down to 10 men? Yes we should. It's frustrating but he's left the 10 out there in a very difficult position. I'm sure he'll be very regretful of what's happened today. Occasionally players see the red mist.
"I thought we'd done enough in terms of digging in and defending as a group. We made big sacrifices to ensure that we could take a point back down the motorway but it wasn't to be."
- 3MattockBooked at 15mins
- 25Odjidja-OfoeBooked at 45mins
- 24AndreuSubstituted forLedesmaat 68'minutes
- 27DerbyshireSubstituted forMaguireat 83'minutes
- 1MarshallBooked at 41mins
- 3da Silva
- 11NooneSubstituted forJonesat 76'minutes
- 7WhittinghamBooked at 23mins
- 38AmeobiBooked at 18minsSubstituted forRevellat 86'minutes
- 10MasonSubstituted forMooreat 42'minutes
- 5Ecuele Manga
- Keith Hill
- Shots on Target
Second Half ends, Rotherham United 2, Cardiff City 1.
Own Goal by Matthew Connolly, Cardiff City. Rotherham United 2, Cardiff City 1.
Foul by Joe Mattock (Rotherham United).
Alex Revell (Cardiff City) wins a free kick in the defensive half.
Joe Newell (Rotherham United) hits the right post with a left footed shot from outside the box.
Substitution, Cardiff City. Alex Revell replaces Sammy Ameobi.
Chris Maguire (Rotherham United) wins a free kick in the defensive half.
Foul by Sammy Ameobi (Cardiff City).
Offside, Cardiff City. Simon Moore tries a through ball, but Kenwyne Jones is caught offside.
Substitution, Rotherham United. Chris Maguire replaces Matt Derbyshire.
Foul by Matt Derbyshire (Rotherham United).
Matthew Connolly (Cardiff City) wins a free kick in the defensive half.
Attempt saved. Jonson Clarke-Harris (Rotherham United) left footed shot from the centre of the box is saved in the centre of the goal.
Attempt blocked. Emmanuel Ledesma (Rotherham United) left footed shot from outside the box is blocked.
Matt Derbyshire (Rotherham United) wins a free kick in the attacking half.
Foul by Fabio (Cardiff City).
Attempt missed. Jonson Clarke-Harris (Rotherham United) header from the centre of the box is close, but misses the top right corner. Assisted by Joe Newell with a cross.
Attempt missed. Farrend Rawson (Rotherham United) header from very close range is too high. Assisted by Matt Derbyshire with a cross following a corner.
Attempt blocked. Vadis Odjidja-Ofoe (Rotherham United) right footed shot from the left side of the box is blocked. Assisted by Matt Derbyshire.