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."
Harry Davis fouled by John Akinde, the ref awards a free kick. Steve Phillips restarts play with the free kick.
Adam Reed restarts play with the free kick.
90:00 +2:32 Booking
Booking The referee shows Gregor Robertson a yellow card for unsporting behaviour.
Gregor Robertson challenges John Akinde unfairly and gives away a free kick.
90:00 +1:49 Booking
Booking Simon Eastwood goes into the referee's book.
90:00 +1:19 Booking
Booking Harry Davis receives a caution.
Corner taken right-footed by Luke Murphy from the left by-line, clearance by Gabor Gyepes. Corner taken by Gregor Robertson from the left by-line to the near post, Gabor Gyepes manages to make a clearance.
Foul by Johnny Ertl on Ajay Leitch-Smith, free kick awarded. Luke Murphy restarts play with the free kick.
Substitution (Portsmouth) makes a substitution, with John Akinde coming on for Patrick Agyemang.
Shot from close range by Mathias Pogba misses to the left of the goal.
Shot by James Keene from just outside the area goes over the net.
Effort from just outside the area by Adam Reed strikes the post.
Dan Butler delivers the ball.
Short corner taken by Adam Reed.
Byron Moore takes a shot. Save made by Simon Eastwood.
Ajay Leitch-Smith takes a shot. Simon Eastwood makes a save.
Max Clayton takes a shot. Save by Simon Eastwood.
Substitution Liam Walker goes off and Adam Reed comes on.
Free kick taken by Simon Eastwood.
Booking The referee shows Ricardo Rocha a yellow card for unsporting behaviour.
Max Clayton challenges Ricardo Rocha unfairly and gives away a free kick.
Ajay Leitch-Smith is ruled offside. Simon Eastwood takes the indirect free kick.
Short corner taken by Luke Murphy from the right by-line.
Dan Butler takes the free kick.
Booking Luke Murphy goes into the book.
Luke Murphy challenges Liam Walker unfairly and gives away a free kick.
James Keene gives away a free kick for an unfair challenge on Ajay Leitch-Smith. The free kick is delivered right-footed by Luke Murphy from right channel, Gabor Gyepes manages to make a clearance.
Substitution Kelvin Mellor joins the action as a substitute, replacing Matt Tootle.
Assist by Byron Moore.
62:30 Goal scored
Goal! - Mathias Pogba - Crewe 1 - 2 Portsmouth Mathias Pogba finds the back of the net with a goal from inside the six-yard box to the top right corner of the goal. Crewe 1-2 Portsmouth.
Byron Moore takes a shot. Save by Simon Eastwood.
Johnny Ertl takes a shot. Save by Steve Phillips.
Corner taken right-footed by Luke Murphy.
The offside flag is raised against Ajay Leitch-Smith. Free kick taken by Simon Eastwood.
The referee gets the second half underway.
Substitution James Keene on for David Connolly.
Substitution Max Clayton joins the action as a substitute, replacing Chuks Aneke.
45:00 +1:02 Half time
Half Time It is the end of the first-half.
Effort on goal by Jed Wallace from inside the area goes harmlessly over the bar.
Effort from inside the area by David Connolly misses to the right of the target.
Corner taken by Luke Murphy from the right by-line to the near post, David Connolly makes a clearance.
Therry Racon has an effort at goal from outside the area which goes wide right of the goal.
Corner taken by Dan Butler from the right by-line to the near post, Ricardo Rocha has a headed effort from close range and clears the bar.
Centre by Byron Moore, save by Simon Eastwood.
Luke Murphy takes a outswinging corner from the right by-line played to the near post, Gabor Gyepes manages to make a clearance.
Luke Murphy takes a outswinging corner from the right by-line played to the near post, Header from close range by Chuks Aneke misses to the right of the goal.
The assist for the goal came from Patrick Agyemang.
28:05 Goal scored
Goal! - David Connolly - Crewe 0 - 2 Portsmouth David Connolly fires in a goal from inside the six-yard box to the bottom left corner of the goal. Crewe 0-2 Portsmouth.
Free kick awarded for an unfair challenge on Abdul Osman by Johnny Ertl. Harry Davis takes the direct free kick.
Inswinging corner taken left-footed by Dan Butler from the right by-line, Patrick Agyemang takes a shot. Clearance by Matt Tootle.
Free kick awarded for a foul by Abdul Osman on Johnny Ertl. Simon Eastwood takes the direct free kick.
David Connolly takes a shot. Save by Steve Phillips.
Shot by Ricardo Rocha from outside the box goes high over the crossbar.
Free kick awarded for an unfair challenge on Yassin Moutaouakil by Byron Moore. Liam Walker crosses the ball in from the free kick, clearance made by Gregor Robertson.
Assist by Johnny Ertl.
5:15 Goal scored
Goal! - Patrick Agyemang - Crewe 0 - 1 Portsmouth Patrick Agyemang grabs a goal from just inside the penalty area to the bottom left corner of the goal. Crewe 0-1 Portsmouth.
Free kick awarded for an unfair challenge on Johnny Ertl by Ajay Leitch-Smith. Free kick taken by Gabor Gyepes.
Corner from the right by-line taken by Luke Murphy, clearance by Gabor Gyepes.
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.