Moussa Dembele's goal 15 minutes from time gave Fulham a priceless three points against fellow strugglers MK Dons.
The Whites were only a point clear of the visitors going into the game, with the Buckinghamshire side occupying the final place in the relegation zone.
Fulham dominated proceedings and should have been out of sight in the first half but took the lead when Ross McCormack scored after 54 minutes.
However, Josh Murphy was allowed to go clean through and he equalised, lobbing Marcus Bettinelli.
But McCormack turned provider as he teed up Dembele to fire home from six yards.
Fulham raced out of the blocks and Tom Cairney should have put the home side in front after 30 seconds but he fired wide.
Just two minutes later, Dembelehad a chance to give the home side the lead but he hit the ball over the crossbar.
Midway through the first half, McCrmack struck a powerful effort from 25 yards into the post before Dembele fired straight at Cody Cropper as the first half finished goalless.
The Whites continued to press in the second half and Dembele knocked the ball across the box for McCormack to turn the ball home and send Craven Cottage into raptures.
However, the home defence fell asleep and Murphy pounced to level the contest and bring the nerves back into the home fans.
But, with 15 minutes to go, Fulham had the winner as McCormack turned provide for Dembele to slot home from lose range and relieve the home supporters as they moved clear of the drop zone.