First Test, Chennai (day two, close): South Africa 540 v India 82-0
Amla's century was his first in a Test match outside South Africa
Hashim Amla made a magnificent 159 as South Africa put India firmly on the back foot on day two of the first Test in Madras (Chennai).
Amla batted for seven hours and struck 20 fours before being run out as the tourists reached a total of 540.
Mark Boucher also played well for 70 but Harbhajan Singh finally cleaned up the tail for figures of 5-164.
India's openers responded in positive fashion, seeing them to 82-0 at stumps, with Virender Sehwag unbeaten on 52.
Fast bowler Dale Steyn tried to shake the Indian batsmen up in a hostile new ball spell and struck Sehwag's partner Wasim Jaffer (25) on the upper arm with a short-pitched delivery.
But he was unable to achieve a breakthrough and Sehwag, who hit a four and a six off successive balls in Makaya Ntini's opening over, pushed Steyn through the covers to reach a 59-ball half century in the final over of play.
The day began with Amla 15 runs short of his fourth Test century, and first on foreign soil, and the 24-year-old did not waste any time in reaching three figures with three consecutive boundaries through the off-side from the bowling of Sree Santh.
Amla and overnight de Villiers were both in aggressive mood and it came as a huge relief to India when de Villiers succumbed to the second new ball, edging a catch to the keeper off Santh and departing for 44.
Harbhajan's five wickets were reward for a tireless effort
But the home side had to wait 29 overs for their next success as Amla, whose concentration and shot-selection were exemplary, and Boucher added 99 for the sixth wicket.
They were eventually separated when Boucher played the ball to Santh's left in the covers but then changed his mind about a single and Amla was unable to regain his ground in time.
It did not affect South Africa's momentum, however, and Boucher had a century there for the taking when he tried to slog-sweep Sehwag's off-spin and top-edged a catch to slip.
Morne Morkel weighed in with 35, his highest Test score, but then gave a return catch to Harbhajan, who brought the innings to an end by adding the wickets of Paul Harris (five) and Steyn (15).
South Africa batsman Hashim Amla: "These were the hottest conditions I have ever batted in. It was a difficult challenge, so I rate this effort up there with my best.
"The wicket was good to bat on, but it is always special to score a century in the sub-continent.
"There is a lot of hard work ahead for the bowlers and we are hoping the wicket will do a bit on the third and fourth day."
India's Virender Sehwag: "It will not be easy to bat on the final day, so if we can get a lead of about 100 we can put the South Africans under pressure.
"If the ball is [there] to be hit, I will hit it, but I want to start afresh tomorrow and build a big score.
"It was hard work for our bowlers but Hashim was a surprise. We did not expect him to play the way he did."