Sunderland remain in danger of relegation from the Premier League after squandering a one-nil lead before being well beaten at Fratton Park.
Kenwyne Jones looked to have set the Black Cats on course to secure top flight status by netting his 11th goal of the season 14 minutes after half time.
John Utaka levelled only 90 seconds later and Phil Bardsley's own goal and a late Armand Traore strike left Sunderland facing an anxious final day clash at home to FA Cup finalists Chelsea.
Portsmouth striker Peter Crouch headed against a post early on before Jones was also denied by the woodwork in an evenly matched first half.
Portsmouth began the second 45 strongly but it was Sunderland who took the lead against the run of play with the first of three goals in an explosive nine minute spell.
Defender Calum Davenport came marauding down the right before picking out Jones with a sublime cross and the Trinidadian rolled the ball beyond stand in Blues goalkeeper Asmir Begovic and into the bottom right corner.
The visitors' lead lasted less than two minutes before Utaka drew Portsmouth level with his first goal in 13 months.
Crouch flicked on Begovic's long ball and Grant Leadbitter could only head his attempted clearance into the path of Utaka, who held off the challenge of Danny Collins to slide home from a tight angle.
Portsmouth were gifted the lead eight minutes later after some calamitous Sunderland defending.
Anton Ferdinand inexplicably allowed another 80-yard punt from Begovic to roll under his boot, sending Utaka clear. Nigerian Utaka rounded stranded Black Cats goalkeeper Marton Fulop before the unlucky Bardsley turned the ball into his own net as he slid back in a desperate attempt to clear the danger.
Substitute Traore compounded a miserable night for Sunderland and their 1300 travelling fans with a coolly taken third two minutes from time. Ricky Sbragia's side will now do battle with North East rivals Newcastle and Middlesbrough and Hull in a four way fight to stay up.