Amla, 31, batted for more than eight hours to frustrate the Sri Lankan spinners who shared nine wickets between them to bowl out South Africa for 282 in their first innings.
Sri Lanka, who made 421 in their first essay, were 11-0 at stumps in their second innings for an overall lead of 150.
Off-spinner Dilruwan Perera (5-69) grabbed a five-wicket haul, his second in five Tests, while left-armer Rangana Herath chipped in with 4-71.
For Amla, it was his first century as South Africa's Test captain. He faced 382 balls and hit 12 fours in his marathon effort.
His century, also the first by a South African captain in Sri Lanka, proved crucial and helped the visitors avoid the embarrassment of a follow-on.
The South African innings was wrapped up in the final session with Herath having Dale Steyn (30) caught by Kumar Sangakkara and Imran Tahir by Upul Tharanga at deep mid-off.
Sri Lankan openers Kaushal Silva (five) and Upul Tharanga (six) saw off the overs without any hiccups.
You’ve reached your limit of {{free_limit}} free articles this month.
Subscribe now for unlimited access.
Already subscribed? Log in
Subscribe to read the full story →
Smart Quarterly
₹900
3 Months
₹300/Month
Smart Essential
₹2,700
1 Year
₹225/Month
Super Saver
₹3,900
2 Years
₹162/Month
Renews automatically, cancel anytime
Here’s what’s included in our digital subscription plans
Exclusive premium stories online
Over 30 premium stories daily, handpicked by our editors


Complimentary Access to The New York Times
News, Games, Cooking, Audio, Wirecutter & The Athletic
Business Standard Epaper
Digital replica of our daily newspaper — with options to read, save, and share


Curated Newsletters
Insights on markets, finance, politics, tech, and more delivered to your inbox
Market Analysis & Investment Insights
In-depth market analysis & insights with access to The Smart Investor


Archives
Repository of articles and publications dating back to 1997
Ad-free Reading
Uninterrupted reading experience with no advertisements


Seamless Access Across All Devices
Access Business Standard across devices — mobile, tablet, or PC, via web or app
