Patrick Agyemang struck his first goal for Portsmouth to help the club end a run of 23-games without a win with a surprise success at Crewe.
Agyemang opened the scoring when he turned Crewe's Mark Ellis and found the bottom corner from just inside the box.
Pompey doubled their lead as Agyemang found veteran David Connolly at the back post who neatly slotted home.
Mathias Pogba fired in the rebound after Byron Moore's shot was saved to give Crewe hope, but Pompey held on.
With 10 League One games left, Pompey are 11 points shy of safety and still in grave danger of a third relegation in four years. But they have now conceded just four goals in a run of one defeat in five games.
Pompey boss Guy Whittingham confirmed after the game that on-loan striker James Keene is to return to his parent club, Swedish side Elfsborg.
The caretaker manager was taking charge for the 20th time since the departure of Michael Appleton on 7 November.
Johnstone's Paint Trophy finalists Crewe's fourth defeat in five games seriously scuppers their fading play-off hopes, dropping them to 14th, now 13 points adrift of the top six.
VIEW FROM THE DRESSING ROOM
Portsmouth caretaker manager Guy Whittingham told BBC Radio Solent:
"We felt it was building and that the team were beginning to work together as a team and get used to each other so to win our first away game in many a while is just great.
"In the last couple of weeks we've just tweaked a little bit defensively and I think that showed in the first half today.
"We tried to do too much with the ball early on in the second half, we didn't shift the ball quick enough, they got on top of us, we got caught and they put us on the back foot."