Cape Town - Jacques Kallis hit his second career double-century on Wednesday, then said South Africa had given themselves enough time to gain a series-clinching win in the third and final Test against Sri Lanka at Newlands.
Scorecard after Day 2
Sri Lanka were 149 for two at the close in reply to South Africa's 580 for four declared - a deficit of 431 runs.
Kallis made a career-best 224 and AB de Villiers hit an unbeaten 160 before the declaration.
Sri Lankan captain Tillekeratne Dilshan hit a dashing 78 before he was caught at deep mid-on off leg-spinner Imran Tahir.
Fellow opener Lahiru Thirimanne was earlier bowled by Morne Morkel for 23 as Sri Lanka set out on the massive task of playing themselves back into the match after Dilshan's decision to send South Africa in backfired spectacularly.
"With the series being one-all, we needed some big performances," said Kallis.
"It's going to be tough (to win) but there is some uneven bounce and Immy (Tahir) has turned one or two and it's only day two.
"We batted at a good rate so we've given ourselves some extra time to try and bowl them out twice. It would have been nice to pick up one extra wicket tonight but we're very happy with the situation. The guys believe we can get 20 wickets."
Sri Lanka coach Geoff Marsh admitted his team faced "three tough days" but said they had the batsmen to make a fight of it.
"If we bat well we are capable of making big scores," he said. "If we can get past the follow-on, the game opens up a bit."
Marsh also paid a glowing tribute to Kallis.
"He's an absolutely fantastic cricketer," he said. "To watch him bat out there... We didn't want to watch him bat, but he was just fantastic. He's just one of the greats. People talk about (Sachin) Tendulkar but Kallis's record is unbelievable."
Marsh said Sri Lanka's bowling performance had been disappointing, but elaborated on the decision to send South Africa in.
"We spoke about it before the game," he said. "We were a little unsure, to be honest, but the captain made that decision and he had the full support of everybody.
"Had we taken our opportunities, it would have been a good decision. We had a chance to get Kallis before he scored but we let it slip."
The Sri Lankan coach said the fact that the pitch had "greened up" after rain on the eve of the match and that the bowlers were "on a roll" after Sri Lanka won the second Test in Durban had influenced the decision.
"We missed (Dilharo) Fernando, who gives us a bit of pace and bounce but we didn't keep the pressure on enough."
South Africa scored at better than four runs an over and were able to declare in mid-afternoon.
Kallis was out in the last over before lunch when he was caught at mid-on off left-arm spinner Rangana Herath after batting for 435 minutes.
He faced 325 balls and hit 31 fours and a six. His fourth-wicket partnership with De Villiers was worth 192.
South Africa added 106 runs in 28.3 overs prior to lunch before the scoring rate rocketed after the interval as De Villiers and Jacques Rudolph (51 not out) piled on another 127 runs off 20.3 overs in 79 minutes.
De Villiers reached his century off 176 balls and then cut loose, adding another 60 off 29 balls. His innings included 19 fours and two sixes - the latter hit off successive balls from Dilshan.
Kallis, playing in his 150th Test, reached his double century off 280 balls with 29 fours and a six.
His previous double-century came against India at Centurion last season, when he made 201 not out.
"I worked on a lot of little things to try to score a bit quicker," he explained.
"Along with doing that, you perhaps get out on the odd occasion because you are trying to be more positive. I've been happy with the decision I've made.
"I probably had a little more pressure on me (to hold the batting together) early in my career, but that was the role I was given.
"My role now is to be a bit more positive and I've got world-class players around me."