QPR boss Mark Warburton felt his side created their own luck after a dreadful error by Millwall goalkeeper Bartosz Bialkowski handed them a 2-1 victory.
Nahki Wells sparked a dull game into life with his second-half strike and moments after Shaun Hutchinson had equalised for the hosts, the striker was gifted his second thanks to Bialkowski's howler.
A fourth successive win left QPR just a point off the top of the Championship while struggling Millwall are without a win in six.
Warburton said: "You earn your luck. We've given soft goals away ourselves in recent games, and that's the nature of the league, you hope over the course of a season they even themselves up.
"I thought we were the better team first half, missed a couple of big chances, but came out and got the goal early.
"We're creating chances, you'll see that in the stats from all the games, even when we've dropped points we've created numerous chances.
"What we have to do is put them in the back of the net. There's games you play really well and don't win, and games you play poorly and come away with a point or all three points.
"We played good football last week, looked really dangerous and could have scored a hatful, looked a really good team playing with the ball.
"Today was a different type of game, different test, different challenge, one we had to respect and stand up to."
There was little sign of the drama to come in a first half lacking penetration, the best chance falling to Rangers' top scorer Jordan Hugill, his shot blocked by Alex Pearce.
Millwall started the second half brighter, with Jed Wallace and Jon Dadi Bodvarsson both forcing Joe Lumley into saves, but it was Rangers who fired themselves ahead after 56 minutes.
Wells led a counter-attack following a Millwall corner and just when it looked as if the move had broken down, the ball fell back to the striker, who lashed it into the corner.
The home side responded with a goal from a corner, Hutchinson reacting quickest to poke the ball home from close range in the 71st minute.
Parity lasted just seconds as Bialkowski's howler allowed Wells a second. The keeper charged needlessly out of his goal to deal with an aimless ball over the top, miscontrolled, and could only watch as the ball rolled for Wells to tap home.
Millwall had chances to get back into the game but neither Wallace, Aiden O'Brien or Tom Bradshaw could hit the target.
Boss Neil Harris said: "Goals change games. One minute you're in the ascendancy thinking here we go, 20 minutes to go at the Den, a London derby, the fans have found their voice, we've got pressure on them, then we make an error like Bart's and the game's gone.
"I feel for Bart, he's a good lad, a good pro, a good goalkeeper, but that's football, isn't it?
"We were getting our noses in front and got back on level terms – I thought we deserved a point out of the game.
"Maybe I have to look at myself for a little bit more consistency – I've never been a manager that tinkers with a team.
"I decided to because I thought the players deserved the opportunity. But if the players aren't going to perform, then they don't deserve the opportunity to play."