South Africa captain Faf du Plessis said there are positives for his side to take from their 189-run loss to England at Newlands on Tuesday, most notably a fighting rearguard action that almost salvaged a draw.
South Africa needed to bat for 146 overs to save the second Test but fell just over eight short as a brilliant spell of bowling from Ben Stokes cleaned up their tail and levelled the four-match series for England in the final hour of the day.
South Africa's batting woes of late are well documented -- they have passed 300 only once in their previous 14 Test innings -- but at least made England work hard for their wickets in Cape Town.
"There are a lot of small margins in this Test match, but I am extremely proud of how we fought," Du Plessis told reporters.
"You never want to lose Test matches, but the challenge we gave to our group last night and this morning was that we will fight with everything we have got within us to try and make England have to do everything to beat us."
Proud as he may be, Du Plessis and Quinton de Kock threw away their wickets on the final day with poor shot selection, and the South African skipper conceded it gave England a massive lift.
"To give England two wickets there on a pitch that was still good was probably the difference at the end of day," he said.
"We had one or two mental errors, but if you look at where we were two months ago as a batting unit, where we were very weak mentally in India and imploded pretty quickly, we could have gone the same way again, but we didn't.
"It is just about improving as a young Test team and making sure we are getting better. Sometimes you will still lose by improving and for me that was the case in the last two days.
"You will not have a perfect batting performance every time you play, and we know the mistakes that we made. But that is Test cricket, it is about pushing each other mentally until one breaks."
The third Test will be played in Port Elizabeth, starting on January 16, with the final match of the series to be staged in Johannesburg from January 24.