|Pathan's century was the fastest for India in South Africa and gave hope after a batting collapse [AFP]
Yusuf Pathan's incredible counter-attacking century proved in vain for India as South Africa won the fifth and decisive one-day international by 33 runs to take the series 3-2.
India were in desperate trouble at 119 for eight before Pathan resurrected their hopes by thumping 105 off 70 balls - the fastest ever for India against South Africa - before the tourists fell short at Centurion.
"It was a lot closer than I thought it would be," Smith said on Sunday.
"Pathan was incredible. He hits the ball so sweetly and when he's on a roll he's so hard to stop.
"I think we have learned some important lessons in this series. It's been hard cricket and we have had to play well."
Morne Morkel bagged four wickets and Dale Steyn and Lonwabo Tsotsobe two apiece for the hosts who dismissed India for 234.
India had been set a Duckworth/Lewis revised target of 268 to win in 46 overs following a rain delay.
Hashim Amla had earlier batted through the South African innings, his 116 not out anchoring a total of 250 for nine in 46 overs.
The pace and aggression of Morkel and Steyn undermined the Indian innings until Pathan staged a classic counter-attack.
The powerful right-hander slammed eight fours and eight sixes in his remarkable innings before man-of-the-series Morkel eventually ended the entertainment when he had Pathan caught at mid-off after a skied drive.
"The whole tour was good for both sides and it was good cricket but our batting department didn't perform in the series," India captain Mahendra Singh Dhoni said.
"Two hundred and sixty-odd, we should have got that. But I guess the biggest positive out of this game is that we have learnt that in the last 10 overs we can chase anything."
Because South Africa's innings was interrupted by rain on 226 for three after 42 overs, the Duckworth/Lewis calculation handed the home team an extra 17 runs.
South Africa's innings ended in turmoil after the 78-minute delay, the hosts losing six wickets for 19 runs in four overs, including two run outs.
Amla shared a stand of 97 for the second wicket with Morne van Wyk (56) and added 102 for the fourth wicket with JP Duminy (35).