Substitute Jamie Proctor denied Sheffield United the chance to go top of the Sky Bet Championship as his stoppage-time goal earned Rotherham a point from a 2-2 draw.
Chris Basham's late header had looked like handing United victory in the early game but a last-gasp leveller from Proctor left the Blades in fourth place behind Norwich, West Brom and Middlesbrough.
United's on-loan goalkeeper Dean Henderson made a string of outstanding saves throughout the match but Rotherham's persistence finally paid off at the death.
The first chance fell to Rotherham in the opening minute, with Jon Taylor bursting down the left and crossing for Richie Towell. The midfielder made a poor connection with the volley and it was kept out by Henderson.
Taylor then missed a huge chance as he headed Will Vaulks's long throw over from close range.
They were punished moments later as Mark Duffy gave United an eighth-minute lead.
Duffy seized on a loose ball in midfield and glided by several challenges before placing the ball coolly past Marek Rodak.
Henderson was called into action again just after the half-hour mark when he had to dive acrobatically to claw out Semi Ayaji's header.
Vaulks and Taylor began to threaten more for Rotherham, with the latter cutting in from the left and forcing Henderson into another diving stop.
United then almost scrambled a second with the ball ricocheting around the penalty area and being cleared off the line by Vaulks, from David McGoldrick, when a goal looked certain.
Ryan Manning's diving tackle denied McGoldrick a good opportunity early in the second period after Wales international Kieron Freeman had burst down the right flank.
Oliver Norwood then had a shot deflected narrowly wide for United and following the resulting corner Duffy drew a save from Rodak.
Henderson again came to United's rescue as he punched away Clark Robertson's half volley, but he could nothing to deny Rotherham's next attack as Taylor's effort levelled matters in the 66th minute.
The winger's strike from the edge of the box took a heavy deflection which deceived the Blades stopper and nestled into the bottom corner.
Taylor then got on the end of Joe Newell's cross but his header looped into the hands of Henderson.
Rotherham pushed for the winner in the final 10 minutes but again found Henderson in top form as he pushed over Ajayi's header from Newell's corner.
Billy Sharp's trickery carved out what looked to be an 85th-minute winner with a looping cross which was headed in at the back post by Basham.
But the Millers kept going and got their reward in the second minute of stoppage time, with Proctor tucking home Michael Smith's centre.