League One basement club Hartlepool secured only their third win of the season against struggling Portsmouth.
Jack Baldwin met Evan Horwood's free-kick to put the visitors ahead and they doubled their lead after the break when James Poole fired home.
Pompey caretaker boss Guy Whittingham made a triple substitution after 63 minutes and debutant Jed Wallace slotted in to give them a lifeline.
But their hopes were dashed when Greg Rutherford pounced in injury time.
Hartlepool remain bottom of the table but have closed the gap on Portsmouth to five points.
VIEW FROM THE DRESSING ROOM
Portsmouth caretaker manager Guy Whittingham told BBC Radio Solent:
"We had chances to score, we're defending pretty reasonably, they're not really troubling us apart from a couple of long distance efforts and then we go and concede to a free kick yet again.
"We keep striving and we keep working at it and you've just got to keep doing the same thing, you've got to keep working hard at what is doing the right thing.
"When you're down the bottom, when you're playing the teams down and around you, you need to win games against them because that allows you to progress up the table and also get a bit of space between you and them, so we haven't done that today."