Premiership leaders Portsmouth held out against a spirited second-half display from League Two Mansfield to book their place in the Carling Cup third round.
Manuel Fernandes opened the scoring after five minutes, curling a fine left-footed shot into the corner.
Matt Taylor then fired a fierce low drive into the corner to make it 2-0.
But Stags substitute Danny Reet became the first player to score against Pompey this season, poking home with nine minutes of time remaining.
Mansfield: White, Mullins, Baptiste, Buxton, Jelleyman, Hamshaw, D'Laryea, Dawson (Lloyd 71), Coke (Boulding 78), Barker, Beardsley (Reet 72).
Subs Not Used: Birchall, Muggleton.
Goals: Reet 81.
Portsmouth: Kiely, Duffy, Pamarot, O'Brien, Taylor, Koroman (Douala 77), Fernandes, Kranjcar (Thompson 62), Hughes, Cole, LuaLua (Mwaruwari 73).
Subs Not Used: Ashdown, Songo'o.
Booked: Kranjcar, Pamarot, Fernandes.
Goals: Fernandes 5, Taylor 33.
Ref: M Thorpe (Suffolk).