ROTHERHAM United came within six minutes of a place in the fourth round of the FA Cup before succumbing to Championship high-fliers QPR in a nail-biting penalty this afternoon.
The table-topping League One Millers agonisingly went out 8-7 on spot-kicks at Loftus Road after doing enough to win the contest.
Michael Ihiekwe's 99th-minute goal had them heading for a famous extra-time win until they were pegged back in the 114th minute by the home side.
Ihiekwe was one of the scorers in the shoot-out where saved efforts by Wes Harding and Chiedozie Ogbene did for Paul Warne's men.
Other players to hit the target were Michael Smith, Ollie Rathbone, Josh Kayode, Hakeem Odoffin, Jamie Lindsay and Tolaji Bola.
Rotherham left wantaway Freddie Ladapo on the bench throughout the match after the striker's transfer request.
They started well and asked questions of opponents from a higher division, although there were few sights of goal for either team.
Keeper Josh Vickers kept it goalless for the Millers on 25 minutes, producing a sharp save to deny Andre Gray when the QPR striker met Lee Wallace's cross with a firm shot.
Rotherham were enjoying some possession and territory but were unable to find a final ball to trouble the West London outfit.
Vickers was called into 35th-minute action to make a routine save when Jimmy Dunne failed to get enough power on his header from George Thomas' delivery.
At the other end, a combination of Richard Wood and Ihiekwe caused problems when Harding crossed low but the moment of danger came to nothing.
Around 700 travelling fans had made the journey to the capital and, housed in the upper tier of the away end, they were making much more noise than the home followers on a rainswept, murky afternoon.
Charlie Austin looked to sweep home Stefan Johansen's corner as QPR started to assert some authority only to be thwarted by another Vickers stop as the first half drew towards a close.
The Millers went in at the interval pleased that some committed defending when it was needed had kept the scores level.
Ladapo's situation meant a start up front for Will Grigg as the Millers went with a strong line-up.
The offensive threat of wing-back Ogbene was held back for a second-half impact and Wes Harding was selected in his place on the right.
After his recent good form, Kieran Sadlier was given another start in his favoured attacking midfield role.
The visitors began the second half on the front foot and within seconds Smith wasn't far away with a header as he beat goalkeeper Jordan Archer to Grigg's teasing cross.
Five minutes later, Gray's headed effort was comfortably claimed by Vickers who was being kept busy without being unduly tested.
Just past the hour-mark, Rotherham had a huge let-off when Vickers came and didn't collect and was a relieved man indeed when Gray, with time and space at the back post, lifted his attempt over the bar.
Both teams were seeking to attack and, after the Millers had made attacking substitutions by bringing on Ogbene and Kayode, Ihiekwe saw a goalbound effort kept out by a block, Kayode was only an inch away from connecting with Shane Ferguson's cross and Dan Barlaser skidded an effort wide.
With 13 minutes of the regulation 90 left, Kayode got in a header and only Yoann Barbet's goalline intervention kept it from bobbling into the net before Wood's headed attempt was high and wide.
In a last bid to avoid extra time, both teams mustered a final chance. Odoffin stung Archer's hands with a fierce drive after Kayode's set-up and then Lyndon Dykes was foiled by a point-blank wonder-save from Vickers.
Kayode was making a good impression and the young striker flashed a header wide as overtime got under way.
Rotherham had been the stronger side in the second half and they were continuing in the same vein, Ollie Rathbone dancing into the area and shooting off target.
Much, much better was to come when centre-half Ihiekwe controlled Wes Harding's 99th-minute cross and sent a cool-as-you-like, precision finish worthy of a centre-forward beyond Archer.
The Millers, looking fitter than QPR, were giving everything and Jamie Lindsay was next to try his luck, his 18-yard effort going wide as the first period of extras came to a close.
A slaloming run from Albert Adomah created a shooting opportunity for Gray that Vickers was equal before QPR found a way through in the 114th minute when Dyke's header went in off the bar.
Huge shouts for a Rotherham penalty as Ogbene tumbled at speed under the challenge of Bardet went unheeded.
The irony later was that Ogbene would miss his shoot-out spot-kick to seal his team's fate.
Defeat was cruel but the performance against a side fifth in the Championship offered Rotherham nothing but encouragement.
QPR (3-5-2): Jordan Archer; Rob Dickie, Jimmy Dunne, Yoann Barbet; Albert Odomah, Dominic Ball (Luke Amos 71), Stefan Johansen, George Thomas (Andre Dozzell 71), Lee Wallace (Moses Odubajo 59, Aaron Drewe 90); Andre Gray, Charlie Austin (Lyndon Dykes 59). Subs not used: Joe Walsh, Sam Field, Stephen Duke-McKenna, Sinclair Armstrong.
Rotherham (3-5-2): Josh Vickers; Rarmani Edmonds-Green (Chiedozie Ogbene 59), Richard Wood, Michael Ihiekwe; Wes Harding, Kieran Sadlier (Jamie Lindsay 59), Dan Barlaser (Hakeem Odofffin 79), Ollie Rathbone, Shane Ferguson (Tolaji Bola 79); Michael Smith, Will Grigg (Josh Kayode 65). Subs not used: Viktor Johansson, Angus MacDonald, Joe Mattock, Freddie Ladapo.
Goals: Ihiekwe 99 (Rotherham); Dykes 114 (QPR).
Referee: Dean Whitestone (Northamptonshire).
Attendance: 7,157 (685).