Portsmouth beat Manchester City 2-1 at Fratton Park after leading scorer Kanu came from the bench to score a winner after good work by Glen Johnson.
Portsmouth manager Harry Redknapp made seven changes to the side as he attempted to alter Pompey's fortunes and he was soon rewarded for his bold move with a first goal in four league matches.
Mendes conjured up memories of his last-gasp winner against Stuart Pearce's team last season when he fired a 25-yard left-footed shot beyond Andreas Isaksson. Gary O'Neil's corner was punched well away by the Swedish keeper - making his first Premiership start - but Mendes latched on to it ahead of the flat-footed Ousmane Dabo and thumped home his second goal of the season.
The Portuguese midfielder, knocked unconscious by Ben Thatcher's forearm smash at the City of Manchester Stadium in August, scored twice in last season's meeting at Fratton Park which sparked a run of six matches unbeaten which effectively saved them from relegation.
Confidence seemed to flood back and Lomana LuaLua, in only his fifth Premiership start of the campaign, came raiding down the left only to finish with a shot into the side-netting. His next effort was much better, another 25-yarder which Isaksson turned around the post at full stretch.
The City keeper was in action again after 14 minutes when O'Neil played Taylor through to hit a savage drive that Isaksson tipped over. Mendes was at the hub of another dangerous move when Isaksson again had to make a fine save after LuaLua connected O'Neil's deep cross.
But Pompey had a lucky escape when Djimi Traore seemed to handle a corner as Dabo moved in for a header in the 35th minute.
Referee Dean missed it and also did not see Barton's charge into the back of Mendes six minutes later, although the official booked the newly-capped England midfielder after he charged into O'Neil - who was trying to put the ball out of play so his team-mate could receive attention.
City had been gradually working their way back into the game and Corradi struck a powerful drive into the side-netting before Barton's long-range free-kick curled just wide.
But Pompey's biggest escape came when David James kept alive his chance of a record-equalling 141st Premiership clean sheet with a superb save from Corradi's header in first-half stoppage time.
However, James' hopes were dashed when Corradi came up with a well-taken 62nd-minute equaliser.
Pompey's defence went missing as Traore gave the ball away near the halfway line and Barton, inevitably, worked it along the right flank for Darius Vassell whose low cross was expertly despatched by the Italian striker.
City looked the most likely winners at that point with Michael Ball, making his debut, just off target from 20 yards.
But Kanu, a 71st-minute replacement for former City striker Andy Cole, proved to be the match winner when he drilled in a low drive 10 minutes after coming on after Glen Johnson had crossed from O'Neil's throw.