Rotherham United slipped into the drop zone as they lost for the second week in succession to the Championship's bottom club.
Last week it was a 4-2 defeat at Blackburn Rovers. This time it was at home to Cardiff City, who had replaced Rovers at the foot of the table, and the boos rang out at the end at New York Stadium.
Two goals from former England striker Rickie Lambert did for the Millers after Alan Stubbs' side had led 1-0.
It was the fourth time in five home league matches that Rotherham have gone ahead only to concede twice.
Izzy Brown put them ahead on the hour mark, slotting the ball across goal and in after Kelvin Wilson's shot had been blocked and Dael Fry had cleverly headed the ball into the Chelsea loan teenager's path.
The lead lasted 13 minutes until Lambert headed the Bluebirds level from a free-kick and six minutes later the same players swung the game the visitors' way as his weak shot deflected in off Darnell Fisher.
The Millers had edged the first half and had the better chances.
Fry was denied his first Millers goal when Ben Amos got down sharply to save his 14th-minute shot, Danny Ward was denied by another decent stop nine minutes later and then Brown fired just wide.
Joe Ralls came closest for the visitors, shooting just over in the 33rd minute.
Skipper Lee Frecklington made his first start since the opening-day draw with Wolves after a calf injury and took his place in a midfield which also included Joe Newell.
Striker Dexter Blackstock was in the matchday 18 for the first time after working on his fitness since joining the club on a three-year deal nearly three weeks ago.
He came on for his debut with the Millers 2-1 behind and almost scored with his first touch in the 83rd minute.
However, his shot was blocked, and after that Cardiff saw out the match without undue trouble to heap the pressure on Stubbs and his side.
Rotherham United (4-4-1-1): Camp; Fisher, Wilson, Fry, Mattock; Taylor, Frecklington, Halford, Newell (Blackstock 82); Brown; Ward. Subs not used: Price, Vaulks, Forde, Forster-Caskey, Ball, Yates.
Cardiff City (4-2-3-1): Amos; Peltier (Ecuele Manga 88), Morrison, Connolly, Richards; O'Keefe, Whittingham; Noone, Immers, Ralls (Harris, 69); Lambert. Subs not used: Wilson, John, Kennedy, Hughes, Zohore.
Goals: Brown 60 (Rotherham), Lambert 73, 79 (Cardiff).
Referee: David Coote (Nottinghamshire).
Attendance: 8,348 (390).