After South Africa ran riot on Day 2 to take command of their test match against Sri Lanka, the home side had a fluctuating day of form on Day 3.
Sri Lanka ended the day on 283-9 as the visitors took control of the game with the ball in hand.
Sri Lanka had started the day on 30-0 after South Africa declared on 459-9 in their first innings, late on Day 2.
Here is the full scorecards for all of the action from the day's play:
|JK Silva||c Philander b Steyn||8||43||18.60|
|WU Tharanga||st De Kock b Duminy||83||155||53.54|
|KC Sangakkara||b Morkel||24||34||70.58|
|DMPM Jayawardene||lbw Steyn||3||9||33.33|
|HDRL Thirimanne||c De Kock b Steyn||38||98||38.77|
|AD Mathews||b Imran Tahir||89||182||48.90|
|LD Chandimal||c Petersen b Steyn||6||11||54.54|
|MDK Perera||c De Kock b Steyn||0||5||0.00|
|HMRKB Herath||not out||12||44||27.27|
|RAS Lakman||c De Kock b Morkel||6||20||30.00|
The home team started Day 3 sprightly after hitting 50 runs in their first 18.4 overs, but they lost their first wicket early as Kaushal Silva fell to the bowling of Dale Steyn, for just eight runs.
Kumar Sangakkara and Upul Tharanga then seemed to steady the ship for Sri Lanka as the game moved toward lunch.
However, after a short rain delay, Sangakkara played on to a Morne Morkel delivery, when the batsman looked settled and ready to deliver yet another big score. He left the field of play on a disappointing 24 runs after being bowled out.
Steyn then returned to take the wicket of Mahela Jayawardene, whom he trapped LBW for just three. The batsman only survived nine deliveries and was caught out by a wicked in-swinger from the bowler.
But Tharanga stayed resolute at the other end of the crease as he hit a half century in his first test match in seven years to keep his team's head above water.
He put on an excellent display of batting, pulling and driving the South African bowling attack as he took control.
He then hit a beautiful shot off JP Duminy to bring up his well deserved half-century.
But it was Duminy who finally trapped Tharanga with a spinning ball out of the rough, leading to the Sri Lankan player being stumped.
Tharanga ended his day with a great total of 83 runs from 155 balls.
Duminy then continued his fine spell, restricting Angelo Mathews and Lahiru Thirimanne to just 14 from the following 12 overs, and the momentum that the home team had built began to erode.
But Thirimanne and Mathews dug in for 140 balls to add 46 runs before tea.
However, the wickets started to tumble after the break as Thirimanne (38), Mathews (89), Dinesh Chandermal (6), Dilruwan Perera (0) and Suranga Lakman (6) all surrendered their places at the crease.
Steyn ended Friday with a fantastic five wicket haul and was praised by ESPNcricinfo's Firdose Moonda
And now Dale Steyn has five again in Sri Lanka. Stunning stuff from him after tea. Really changing the course of this match #slvsa— Firdose Moonda (@FirdoseM) July 18, 2014
The collapse left Sri Lanka 172 runs behind their opponents with just one wicket remaining.
Will South Africa win this test match?
This is a game that South Africa are likely to capture now with their strong pace attack and balanced spin. They were too much for the Sri Lankan batsmen on the day and should finish off their innings quickly on Day 4.
The draw also looks very possible here but the South African side will give themselves every opportunity of claiming a test match victory if they can get the bat in hand early on Saturday.