Fulham held on at west London rivals QPR to claim back-to-back Championship wins for the first time this season.
The visitors’ opener came with a stroke of fortune as Ryan Fredericks’ strike was heavily deflected off Jack Robinson to wrong-foot goalkeeper Alex Smithies.
Rui Fonte blazed over from the penalty spot before Stefan Johansen’s low finish looked to have sealed victory.
But substitute Conor Washington’s strike made it 2-1 and QPR pushed for a late leveller that just would not come.
Fulham’s Sheyi Ojo was taken to hospital with a dislocated collarbone in the second half and that contributed to nine minutes of stoppage time being signalled, with Washington’s close-range finish coming in the second of those.
The hosts then bombarded Fulham’s penalty area in the closing moments and Luke Freeman and Matt Smith both went close before Tomas Kalas hooked the ball off the line as Fulham held on.
Defeat extended QPR’s winless run to five games, while Fulham’s victory was their third in their past four away games.
Johansen’s crisp effort ultimately proved decisive for Slavisa Jokanovic’s improving side, ensuring his team-mate’s miss from the spot was not costly, with Fonte also having gone close on the counter in an open first half.
QPR boss Ian Holloway: “The disappointing thing was the second goal, just after they missed a penalty and justice was done there.
“But after that, they broke again and when that ball got squared, how can we have two touches on the edge of our area, just after they’ve missed a penalty?
“We kept going and we should have got a point out of that. But such is life.”
Fulham boss Slavisa Jokanovic: “I am always happy with three points and to win a west London derby.
“We had to be brave. The last few minutes it was a completely different game. A lot of things were happening in the penalty box, but we defended well.
“Unfortunately we have another player in hospital tonight. It is some kind of dislocation of his shoulder. But hopefully after the international break we will get some of our important players back.”