The new-look Springboks won the series 2-0 after a 31-17 win over the Triple Crown holders in Bloemfontein last weekend.
South Africa recalled Montgomery after a three-year absence and Jaque Fourie in place of Gaffie du Toit and Henno Mentz and there was a late injury-induced change with lock Quinton Davids replacing first Test star Bakkies Botha.
Ireland also had to make a late alteration with right wing Geordan Murphy withdrawing through injury to be replaced by Shane Horgan with Kevin Maggs coming in at centre to partner captain Brian O'Driscoll.
The visitors were first to strike with Tyrone Howe going over in the corner after seven minutes having been set up by a superb long pass from O'Driscoll. Fly-half Ronan O'Gara converted.
Montgomery reduced the deficit with a 17th-minute penalty and the Springboks edged ahead soon after when right wing Breyton Paulse went over in the left corner and Montgomery converted.
Another Montgomery penalty made it 13-7 on a warm, slightly overcast winter afternoon in the south-west city and prop Reggie Corrigan did Ireland no favours when sent to the 'sin bin' for an unprovoked punch at Paulse.
The Irish line was breached again as replacement back Brent Russell triggered a move that ended with Fourie going over in the corner and Montgomery converted to give the Springboks a deserved 13-point advantage.
O'Gara dropped a goal on the stroke of half-time to leave South Africa 20-10 ahead and Montgomery was first to score in the second half, kicking a medium-range penalty from in front of the posts.
But the Springboks lost centre Wayne Julies to the sin bin and when Montgomery was beaten by the bounce of a well placed grubber kick from replacement fly-half David Humphreys, O'Driscoll touched down and Humphreys converted to leave the final six-point margin between the teams.
SOUTH AFRICA 26 (Breyton Paulse, Jaque Fourie tries; Percy Montgomery 2 cons, 4 pens)
IRELAND 17 (Tyrone Howe, Brian O'Driscoll tries; Ronan O'Gara, David Humphreys cons, O'Gara fg) at Newlands, Capetown.