Lomana LuaLua lifted Portsmouth out of the bottom three with an 89th-minute equaliser - against the Newcastle outfit who have loaned him out.
Newcastle striker Craig Bellamy opened the scoring when he latched on to a pass from Kieron Dyer and fired home.
The Magpies lost Dyer through injury but Amdy Faye prevented Jermaine Jenas from scoring a second goal for the visitors with a saving tackle.
Alan Shearer went close before LuaLua volleyed in following a short corner.
Shearer, on the bench for the midweek Uefa Cup clash against Valerenga, was restored to Newcastle's starting line-up.
The former England striker was fouled by Linvoy Primus in the second minute but the resulting Laurent Robert free-kick was easily dealt with by the home side.
In the fifth minute, an inswinging corner from Eyal Berkovic was cleared by Newcastle's Gary Speed, while at the other end Lee Bowyer fired wide from 25 yards.
Struggling Portsmouth gave a first start to LuaLua and the former Colchester star latched on to a pass from Alexei Smertin but, as Olivier Bernard lost his footing, Magpies keeper Shay Given blocked the shot.
Given's opposite number Shaka Hislop was playing through the pain barrier after breaking a finger and his newly-customised gloves seemed to be helping early on because the former Newcastle keeper was able to cut out a corner from Robert.
However, he was beaten before half-time when Dyer strolled through the home defence and set up Bellamy, who tucked the ball home.
Dyer's participation ended soon afterwards when an injury led to him limping off and being replaced by Jenas.
34 mins: Bellamy opens the scoring for Newcastle
40 mins: Newcastle's Dyer limps off under the concerned looks of boss Robson
70 mins: Faye thwarts Jenas when the Newcastle star looked set to score
89 mins: LuaLua equalises for Pompey
Newcastle's goal arguably came against the run of play.
It followed a period of Pompey pressure that culminated in Berkovic squandering a chance from eight yards out.
And the Portsmouth fans screamed for a penalty when Andy O'Brien challenged Smertin and Aiyegbeni Yakubu's shot bounced away for a corner off Speed.
Berkovic was booked for dissent as Portsmouth grew increasingly frustrated after the break and Yakubu headed over a Matt Taylor free-kick from seven yards.
Smertin mis-hit a shot from the centre of the penalty area and he also went close with a drilled effort from 25 yards.
Amdy Faye joined his team-mate in the referee's notebook after a challenge on Lee Bowyer but he responded by sending a volley over the bar from 30 yards, while Berkovic again tried his luck from long distance.
Faye prevented Newcastle from going further ahead in the 70th minute by making a saving tackle when Jenas looked certain to score and the Magpies man was then thwarted by Hislop, who turned a cross round the post.
Shearer then missed a chance to put Newcastle further ahead with only 10 minutes remaining when he headed over the bar from a corner.
And he was left to regret that miss when LuaLua, who has signed from Newcastle until the end of the season, sent the Portsmouth fans into raptures when he volleyed home from a short corner.
Portsmouth: Hislop, Pasanen, Primus, De Zeeuw, Taylor, Quashie,
Faye (Mornar 71), Smertin, Berkovic (Harper 90), LuaLua, Yakubu.
Subs Not Used: Wapenaar, Curtis, Hughes.
Booked: Berkovic, Faye.
Newcastle: Given, Hughes, O'Brien, Bramble, Bernard,
Dyer (Jenas 40), Speed, Bowyer (Bridges 82), Robert (Viana 78),
Subs Not Used: Harper, Woodgate.
Booked: Bernard, Bramble.
Referee: A D'Urso (Essex).