Fulham battled back from a goal down at half-time to take all three points against relegation rivals Portsmouth.
Lomana LuaLua had put Pompey ahead in the 32nd minute, firing in a low drive.
Steed Malbranque missed a penalty after Dejan Stefanovic's handball but Andy Cole made Fulham's pressure count when he drove home an equaliser on the hour.
Substitute Brian McBride took advantage of a poor Arjan de Zeeuw backpass to blast the home side ahead before Luis Boa Morte drilled in a late third.
The victory enabled Fulham to leapfrog Portsmouth into 14th place in the table and edge one more step closer to safety.
But it was Portsmouth who made the better start.
Patrik Berger burst into the penalty area in the 19th minute but was let down by his control, while Yakubu also came close with a header.
At the other end, Sylvain Legwinski wasted two chances to put Fulham ahead, failing to make contact with a far-post volley and misdirecting a near-post header.
But just after the half-hour mark, LuaLua latched on to a Yakubu pass and skipped past defenders Zat Knight and Moritz Volz before unleashing a 15-yard shot from left to right that gave Fulham keeper Edwin van der Sar no chance.
The home side seemed to be given a lifeline in the dying seconds of the first half when Cole's left-wing cross was handled by Stefanovic.
But Malbranque's penalty was parried away by keeper Jamie Ashdown, who also saved Boa Morte's follow-up.
A rejuvenated Fulham side took to the pitch in the second half and were soon rewarded for their efforts.
Claus Jensen's shot went over the crossbar, while Legwinski's volley went wide before Cole slotted home the equaliser from the centre of the penalty area.
Fulham manager Chris Coleman's tactics of bringing on McBride for Jensen soon paid off as the American striker made the most of poor defending to latch on to a high-bouncing clearance and spin and half-volley Fulham's second.
In stoppage time, Boa Morte's persistence was finally rewarded when he robbed Linvoy Primus before deceiving Ashdown to seal a crucial win.
Fulham boss Chris Coleman: "Our second-half performance was magnificent. We do start slowly but once you rattle the players' cages they come out and roll their sleeves up.
"We're not safe yet but, if you look at our position, we've jumped some places, we've got a game in hand and a seven-point gap.
"That's the sort of character you need when you're in the position we are."
Portsmouth assistant boss Joe Jordan: "You've got to take your chances and we failed to do that and at the end of the game we got punished for it.
"We got one goal but you've got to score more when the flow's going your way because you can't dominate the game for 90 minutes.
"We weren't as clinical as we should have been. We could have done with the points, so we're a bit frustrated."
Fulham: Van der Sar, Volz, Knight, Goma, Rosenior, Malbranque, Legwinski (Radzinski 64), Clark (Bocanegra 84), Jensen (McBride 57), Boa Morte, Cole.
Subs Not Used: Crossley, John.
Booked: Rosenior, Goma, Boa Morte.
Goals: Cole 63, McBride 81, Boa Morte 90.
Portsmouth: Ashdown, Taylor, De Zeeuw, Primus, Stefanovic, Cisse, Stone (O'Neil 77), Berger (Kamara 82), Skopelitis, Yakubu (Fuller 88), LuaLua.
Subs Not Used: Hughes, Chalkias.
Booked: Stefanovic, Skopelitis, O'Neil.
Goals: LuaLua 32.
Ref: M Clattenburg (Co Durham).