Pavel Pogrebnyak's late backheel saw Reading come out on top in an enthralling third-round Capital One Cup tie at QPR in which they twice had to come from behind.
The Russia international's late effort proved the difference as the Royals progressed to the last 16 at the expense of their Premier League rivals at Loftus Road.
QPR got off to a great start when Junior Hoilett scored a superb solo effort 14 minutes in, although Kaspars Gorkss levelled things up against his former club minutes later.
The 1967 League Cup winners regained the lead when Djibril Cisse fired home from distance, but yet again the visitors responded.
Nicky Shorey's superb 25-yard free-kick saw Reading draw level and provided a platform for them to snatch victory as Pogrebnyak backheeled home nine minutes from time.
The former Fulham striker saw a stoppage-time penalty saved but there was no time for an equaliser on a bad night for QPR, who saw the recently returned Alejandro Faurlin limp off injured.
There were several new faces on show at Loftus Road as both sides handed debuts to summer acquisitions.
Cameroon international Stephane Mbia made his first start since moving to west London from Marseille and was one of four changes to the QPR side that lost 2-1 at Tottenham on Sunday.
Reading handed former Watford defender signing Adrian Mariappa his debut and made seven alterations, with Jimmy Kebe returning after a long injury lay-off.
Hoilett started brightly and he opened the scoring in the 14th minute, jinking past several defenders before sending a fine left-footed strike past Alex McCarthy.
It was a well-deserved lead for QPR but one that barely lasted less two minutes as Gorkss rose highest to head home a Shorey free-kick much to the delight of the 1,495 visiting fans.
The Latvian defender played an integral part in the Hoops' Championship title win last year and refused to celebrate against his former employers.
Cisse forced McCarthy into action with a goalbound header from an Faurlin free-kick, before Jamie Mackie wriggled free and fired across the face of goal.
Reading, though, were now enjoying more possession and Clint Hill had to react quickly to prevent Pogrebnyak directing home an excellent Shaun Cummings cross.
Hal Robson-Kanu was the next to be denied by a block and, after Cisse shot harmlessly wide at the other end, Kebe attempted to give Reading the lead in first-half stoppage time but saw his strike blocked by Hill.
Soon after the restart Robson-Kanu sent a pinpoint ball to Pogrebnyak, who controlled with aplomb and would have fired home had it not been for the QPR defender's late challenge.
Play was swinging from end to end and when the Hoops returned to the attack Mackie was denied by McCarthy, before Hoilett saw penalty appeals ignored by referee Roger East.
Reading thought they had gone ahead when Pogrebnyak converted from close range, only for the goal to be ruled out.
Play was soon back in the Royals' half and McCarthy had to react quickly to deny Park Ji-sung his first QPR goal in the 57th minute.
Mark Hughes shuffled the pack in a bid to take control with 25 minutes remaining, bringing off Dyer and Park for Ryan Nelsen and Bobby Zamora.
Brian McDermott responded by replacing Kebe - booked minutes earlier for a lunge on Nedum Onuoha - with Garath McCleary.
Cisse, redundant for the majority of the game, showed a flash of brilliance in the 71st minute when he put QPR 2-1 up with an unstoppable strike from distance.
Yet again, though, Reading struck back almost immediately and, after a Noel Hunt strike was blocked by Onuoha, a sweetly-struck Shorey free-kick flew in from 25 yards via the underside of the bar.
Then Pogrebnyak backheeled home from close range five minutes later to put the Royals in front for the first time.
Hunt twice tried to extend their lead in the closing exchanges in which Faurlin - only recently back from an anterior cruciate ligament injury - was forced off.
Pogrebnyak earned a stoppage-time penalty when he was adjudged to have been wrestled to the floor by Mbia, but Cesar saved the Russian's penalty low down to his left.