Fulham fought back after squandering an early lead to beat West Ham at Craven Cottage.
A header from Dimitar Berbatov saw Fulham take the lead after 10 minutes despite suspicions of offside.
Kevin Nolan reacted to a quickly-taken free-kick to equalise just after half-time but Hugo Rodallega's header restored Fulham's lead within a minute.
Mladen Petric's shot from a tight angle went in off West Ham's Joey O'Brien to secure the win in stoppage time.
The result saw Fulham leapfrog over West Ham, now without a win since New Year's Day, to ease worries after a run that had seen Martin Jol's side slip down the table.
The game's first chance came after less than 30 seconds when Joe Cole spurned a good opportunity to shoot wide, but it was the home side who took the lead after just 10 minutes.
Damien Duff's free-kick from the right of the West Ham box floated over a packed penalty area, before flicking off Brede Hangeland's chest to the lurking Berbatov on the far post.
The Bulgarian nodded the ball past Jaaskelainen for a simple goal but, together with the West Ham defence, he looked to the officials to check whether he would be flagged for offside. Despite replays suggesting that he was, the goal stood to give Berbatov his eighth of the season.
The former Manchester United striker, celebrating his 32nd birthday, was at his languid best as Fulham held their visitors at bay on the cushion of the early goal.
Bryan Ruiz and Rodallega built on neat work from Berbatov in several moves, with Ruiz drilling a shot at Jaaskelainen, who also reacted quickly to dive at Rodallega's feet to snuff out another chance.
Cole's early miss apart, West Ham's only other chance of note in the first half came on the half-hour, when Kevin Nolan saw his close-range header bounce a yard wide of the post.
Berbatov continued to pose a threat, going on a loping run late in the first half before shaving the post with his shot from just outside the area.
West Ham looked like a different side in the opening exchanges of the second half, and they were level three minutes after the re-start when Kevin Nolan span away from Berbatov at a quickly-taken free-kick to shoot home from an angle.
But Fulham hit back immediately through Rodallega, who climbed above two West Ham defenders to head a Damien Duff cross past Jaaskelainen.
The flurry of goals roused both sides, with Mark Schwarzer making a fine save low to his left to deny another angled effort from Nolan.
Berbatov was in the action again with a shot flashing across Jaaskelainen, but after appearing to tweak a hamstring his contribution ended with 15 minutes remaining.
Andy Carroll went close to marking his first taste of action since 28 November with a goal within a few seconds of replacing midfielder Cole, forcing Schwarzer into action with a low shot from the edge of the area.
But the hosts held firm and they sealed their three points on 90 minutes when Petric, who had replaced Berbatov, saw his shot from the tightest of angles finally roll in off the unlucky O'Brien.
Fulham manager Martin Jol said: "West Ham were two points above us, so we needed this win. We had some good games lately, but could not get the results. We had a lot of draws, we should have won the Swansea game so we were struggling.
"We had to play Man City and Man United away from home, and we've got to play United again on Saturday which is not going to be easy for us. In between we had to play West Ham, and we did what we had to do tonight.
"They were very important, vital points to us and it was vital to them as well. I'm happy because we got the points, and we're on 28 points now."
West Ham assistant manager Neil McDonald said: "We work very hard in training that when we do score we have to keep it tight, unfortunately we didn't stop the cross and we let him (Rodallega) get his chance which was disappointing for us. We very rarely concede goals like that.
"We have a lot of positives to take, we created a lot of chances and we have people coming back, which adds to the squad and hopefully we'll have better results in the remaining games."