Jordon Mutch's spectacular injury-time winner gave Cardiff City their first top-flight away win in 52 years.
Steven Caulker headed Cardiff into the lead from an early corner.
The visitors' aerial prowess troubled Fulham throughout and it took a fine, curled solo goal from Bryan Ruiz to bring a misfiring Fulham level.
But substitute Mutch won another high ball in the dying stages and swivelled to hit a brilliant 25-yard strike into the top corner.
Fulham finding it difficult to win - Jol
Fulham have not won at home since 1 April and manager Martin Jol is under increasing pressure after a poor start to this campaign.
The Cottagers won at Sunderland on the opening day of the campaign but are now struggling in the relegation zone, without a victory in five league matches.
Cardiff's wait for an away win in the top flight stretched back to November 1961 - the last season they played at this level - a success that also came at Craven Cottage.
Fulham's prospects of building on a midweek Capital One Cup victory against Everton were disrupted by an early injury to Scott Parker that forced the holding midfielder off, with Giorgos Karagounis replacing him.
The Greece international was quickly into the thick of the action, his well-timed tackle in the area denying Kim Bo-Kyung at the expense of a corner.
And it was from Peter Whittingham's set-piece that the visitors took the lead.
Fulham have gone seven Premier League matches without a victory at Craven Cottage, their longest winless run in the top flight since 1966
Cardiff threatened to expose Fulham's aerial fragility again, with Brede Hangeland - making his 200th Premier League appearance - blocking another Caulker effort before Steve Sidwell threw himself in the way of Andrew Taylor's header.
David Stockdale was also kept busy and did well to turn over Ben Turner's header from another corner, while referee Craig Pawson ruled the goalkeeper had been fouled before Caulker poked the ball into the net.
The return of Dimitar Berbatov to partner Darren Bent up front should have boosted Fulham's attacking options, but all the home side had to show in the first half-hour was one Karagounis shot which David Marshall turned away.
Although Jol had already been forced to use one substitute, the Dutchman chose to replace Alex Kacaniklic with Ruiz late in the first half and the tactical change proved a masterstroke.
The Costa Rica international collected Sascha Riether's pass before unleashing a curling left-foot shot from 25 yards that gave Marshall no chance in the Cardiff goal.
The visitors should have restored their lead soon after the restart when substitute Mutch, on for Kim, found Fraizer Campbell at the near post, only for the striker to turn the ball over the bar.
Win means a lot to Cardiff - Mackay
At the other end, Berbatov was guilty of a similar miss, heading over after Riether picked out the Bulgarian at the far post.
Fulham were at least much improved from their lacklustre first half and started to pull the Cardiff defence out of shape.
One swift counter promised a winner as Berbatov combined with Bent, but his final pass was just behind the advancing Ruiz.
While the quality occasionally slipped, the entertainment was kept high until the end as both sides pressed for a winner.
Kieran Richardson carved out Fulham's best chance as the full-back crossed into Cardiff's six-yard box, but there was no-one there to meet it.
And with time almost up, Marshall's long punt found Mutch, who outmuscled Richardson before turning inside to hit a worthy winner, his first goal for the club.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.