Portsmouth came from a goal down to beat 10-man Birmingham City and move to within five points of safety.
Nikola Zigic gave promotion-chasing Blues an early lead, firing home after a one-two with Marlon King.
Chris McGuire restored parity, before the visitors had David Murphy sent off.
David Norris then turned and fired home to give Pompey the lead on the hour, Kelvin Etuhu making it 3-1 before Marco Futacs completed the scoring with his fifth of the season in the last minute.
Portsmouth were without a win in nine and, when Zigic netted his 10th of the campaign, things looked bleak.
But Pompey rallied and McGuire, on loan from Derby, brought a good save out of Boaz Myhill before scoring his first goal for the club, a drilled effort into the bottom corner.
Murphy was then sent off for a second bookable offence and, from the resulting free-kick, the home side took the lead.
Greg Halford floated the ball into the area and Norris controlled, turned and fired home.
Etuhu made sure of the points, with his first goal for the club, racing clear and slotting home from a tight angle.
Portsmouth, who were recently deducted 10 points for entering administration, completed the rout when Futacs finished from close range.
The win moves Michael Appleton's side just a point behind Doncaster and Coventry, while Birmingham remain in the top six on goal difference.
Portsmouth manager Michael Appleton said:
"I said to the lads at half-time, 'What are you waiting for?'.
"We had to go out there and express ourselves as this is the last-chance saloon and to be fair they went out there in the second half and worked their socks off.
"I could see they were there for the taking."
Birmingham boss Chris Hughton added:
"I have not been as angry with any other refereeing performance this season. I know how difficult their job is to do but the performance of the referee changed the course of the game.
"I went and saw him afterwards. We should have been given a free-kick in the run-up to their first goal and for their second there were five or six of my players claiming for a handball.
"Then the sending-off was for something so minimal.
"We have got to pick ourselves up and forget about this game and keep fighting for a play-off spot."
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.