Queens Park Rangers moved off the bottom of the Championship with a 2-0 win at Cardiff City.
The Bluebirds dominated proceedings in the first half before Zan Celar's wonder strike put the visitors ahead five minutes before the break.
Cardiff threw everything at QPR as they searched for a leveller, and came close numerous times only to be denied by goalkeeper Paul Nardi.
And in the four minutes of added time, Celar broke clear of the Cardiff defence before calmly chipping the ball over Jak Alnwick to seal the win.
QPR move up one place to 23rd with victory, leaving Portsmouth rooted to the foot of the Championship, while Cardiff remain one place outside the relegation zone.
Both sides were coming off 1-1 draws on the weekend, but in desperate need for three points.
Cardiff made three changes from their draw with Sheffield Wednesday, while QPR were unchanged from their game with Stoke.
And it was the visitors who almost had the perfect start, Paul Smyth getting in behind the Cardiff defence with just 15 seconds played and forcing a save from Alnwick.
Cardiff's best chance of the game came after just four minutes, as a corner kick fell kindly to Perry Ng just a few yards out, but his shot was straight at Nardi.
The Bluebirds had QPR pinned inside their own half for the opening 30 minutes, but despite all their possession they could not break down the stubborn Rangers defence.
Just as the game looked set to go into half time goalless, Celar picked up the ball on the edge of the Cardiff box, took one touch before swivelling and firing into the top corner.
It was the Slovenian striker's first goal of the season, and gave QPR their first half-time lead in the Championship this campaign.
Cardiff threw everything at the visitors in the second half as they searched for an equaliser, but Nardi was equal to everything.
First Joe Ralls had a long-range effort tipped around the post, before the QPR goalkeeper did excellent to race across his line and save Callum Robinson's back-post header.
Further efforts from distance from Callum O'Dowda and Rubin Colwill also needed saving, before Nardi had to be alert to prevent an own goal by Steve Cook on 90 minutes.
And with every blue shirt up the field chasing a late equaliser, Celar got on the end of a long ball behind the Cardiff defence before calmly lofting the ball over the on-rushing Alnwick.
It is just a second Championship win of the season for QPR, who move above Portsmouth at the foot of the table with victory.
Cardiff remain just one point and one place above the bottom three, and have now won just one of their last six games.
Cardiff City interim manager Omer Riza told BBC Sport Wales:
"On tonight's game we wouldn't have scored until the cows came home.
"We had chances, we tried to apply pressure but just lacked that last bit to break them down and score.
"We've gone in 1-0 down which was harsh but then you're chasing the game. It was a game we needed to win.
"It just didn't come, we're coming away from the game highly frustrated."
Queens Park Rangers head coach Marti Cifuentes:
"It was an important win for us as a team, especially for the players as they have been working hard in a difficult period.
"The fact it was Zan Celar, the whole group have been very supportive and protective of him. It was very important, it's a goal all of us have scored.
"He's a good guy, been working hard, and unfortunately until today he had not got the reward of the goals. Hopefully it will increase his confidence and be the first two of many."