Romaine Sawyers grabbed his first Brentford goal to help secure a 2-0 victory over neighbours QPR and lift them to within a point of the play-offs.
Josh Clarke had fired the Bees ahead just before half-time and Sawyers, the free summer signing from Walsall, opened his account with a second-half cracker to end their 52-year wait for a win at Loftus Road.
The fact this was only the sixth time Brentford have made the short trip to Rangers in that period did not stop their fans revelling in a rare success over their historically more illustrious neighbours.
Rangers, by contrast, left the field to boos from the home supporters who had bothered to stay until the end.
Victory was no more than the Bees deserved after they created a host of chances - although their eight-goal striker Scott Hogan was uncharacteristically wasteful.
Hogan could have had a hat-trick in the first half alone. First, after Alex Smithies palmed a Sawyers shot into his path, Hogan could not adjust his feet in time as the ball rolled agonisingly past him, a yard from an open goal.
Moments later Sawyers broke quickly and fed Hogan, who expertly turned Steven Caulker only to curl his effort inches wide.
Then Clark was next to tee up Hogan with a cut-back from the byline, but this time he scooped his effort over the crossbar.
Rangers had their chances in the first half too, with Tjaronn Chery's delicious backheel setting up Conor Washington, whose shot was blocked by John Egan.
Bees keeper Daniel Bentley had to be on his toes to tip a Jordan Cousin's cross over as it threatened to dip under the crossbar and also made saves from Washington and James Perch.
But Clarke made the breakthrough three minutes before the interval following a neat exchange of passes between Sawyers and Josh McEachran.
Clarke feigned a one-two with McEachran but instead skipped inside Nedum Onuoha and rolled the ball past Smithies into the net.
Rangers pushed for an equaliser and Chery fired wide, but Sawyers put the game to bed in style in the 74th minute.
The winger caught Maxime Colin's low cross first-time with a controlled, side-footed finish from the edge of the area which flew into the top corner.
Rangers, suffering another inconsistent season and marooned in mid-table, knew it would not be their night when Idrissa Sylla's goalbound header was cleared off the line by Egan.