Sri Lanka bowled South Africa out for 376 in the first session, securing a 110-run first innings lead, before declaring at 214 for nine shortly before the close of play.
South Africa were seven without loss after facing three overs, with skipper Graeme Smith on five and Boeta Dippenaar yet to score.
The loss of regular wickets during Sri Lanka's second innings, as the pitch became increasingly variable in bounce, delayed any declaration and reduced the number of overs that South Africa had to bat.
Jayasuriya was the backbone of the innings, adding 62 for the first wicket with skipper Marvan Atapattu (25), then 27 with Kumar Sangakkara (13) and 37 with Thilan Samaraweera (19).
Atapattu was trapped lbw by a ball that kept low from Lance Klusener, while Sangakkara miscued a lofted drive off left-arm spinner Nicky Boje and was caught at mid off.
Jayawardene, the first innings double centurion, was also caught on the deep off Boje as Sri Lanka reached tea on 112 for three.
In the final session, wickets tumbled at regular intervals with Jayasuriya nicking a slow off-cutter from Shaun Pollock, who then trapped Tillakaratne Dilshan (one) lbw with an inswinger in his next over.
Samaraweera was the second Klusener victim of low bounce, while Romesh Kaluwitharana, who cracked four boundaries in his 19, was beaten by spin and caught at slip off Boje.
Upul Chandana cracked a brisk 29 from 40 balls, hitting three fours and one six, before holing out in the deep off Boje.
Boje also picked up the wicket of Muttiah Muralitharan just before the declaration, to finish with five for 88 from 22 overs. Pollock took two for 19 from 12 overs.
Earlier, Jacques Rudolph scored his fourth Test hundred before South Africa were bowled out for 376 midway through the morning session.
Sri Lanka needed just four balls to break through as Boje failed to add to his overnight 31 and glanced a catch down the leg side where it was taken one handed by Kaluwitharana.
Makhaya Ntini clubbed two boundaries in his 10 before he skied a catch to Upul Chandana at deep mid-wicket off Muttiah Muralitharan.
Rudolph, who was on 91 when Ntini was dismissed, then had a lucky escape on 96 after a thick edge missed Kaluwitharana's gloves before he finally brought up three figures with an inside edge past his leg stump.
He was then dismissed for 102 when he became Muralitharan's fourth wicket of the innings to extend the off spinner's world Test record tally to 531.
Scorecard:
Sri Lanka first innings 486 (M.Jayawardene 237, C.Vaas 69, K.Sangakkara 58; S.Pollock 4-48).
South Africa first innings (overnight 347-7)
B.Dippenaar run out 46
M.van Jaarsveld c Samaraweera b Muralitharan 37
J.Rudolph c Kaluwitharana b Muralitharan 102
J.Kallis c Sangakkara b Muralitharan 59
G.Smith lbw Jayasuriya 23
M.Boucher c Kaluwitharana b Jayasuriya 6
S.Pollock c Sangakkara b Vaas 25
L.Klusener c Jayawardene b Dilshan 2
N.Boje c Kaluwitharana b Vaas 31
M.Ntini c Chandana b Muralitharan 10
N.Hayward not out 2
Extras: (b-14 lb-8 nb-10 w-1) 33
Total: (139.4 overs) 376
Fall of wickets: 1-84, 2-96, 3-168, 4-213, 5-225, 6-287, 7-295, 8-348, 9-363, 10-376
Bowling: C.Vaas 25-10-50-2 (nb-6), F.Maharoof 19-9-42-0 (w-1, nb-1), M.Muralitharan 46.4-9-130-4 (nb-3), U.Chandana 18-0-68-0, S.Jayasuriya 25-9-40-2. T.Dilshan 6-0-24-1
Sri Lanka second innings:
M.Atapattu lbw Klusener 25
S.Jayasuriya c Boucher b Pollock 74
K.Sangakkara c Hayward b Boje 13
M.Jayawardene c Rudolph b Boje 5
T.Samaraweera b Klusener 19
T.Dilshan lbw Pollock 1
R.Kaluwitharana c Pollock b Boje 19
U.Chanadana c Dippenaar b Boje 29
C.Vaas not out 13
M.Muralitharan c Dippenaar b Boje 2
F.Maharoof not out 3
Extras: (b-4 lb-1 nb-4 w-2) 11
Total: (9 wickets declared, 67 overs) 214
Fall of wickets: 1-62, 2-89, 3-103, 4-140, 5-142, 6-166, 7-172, 8-199, 9-209
Bowling: Pollock 12-2-19-2 (nb-3 w-1), Hayward 6-1-21-0 (nb-1), Klusener 14-2-40-2, Ntini 5-0-19-0, Boje 22-0-88-5, Kallis 8-1-22-0 (w-1)
South Africa second innings
G.Smith not out 5
B.Dippenaar not out 0
Extras: (b-1 lb-1) 2
Total: (without loss, three overs) 7
Still to bat: M.van Jaarsveld, J.Rudolph, J.Kallis, M.Boucher, S.Pollock, L.Klusener, N.Boje, M.Ntini, N.Hayward
Bowling: Vaas 1-0-3-0, Jayasuriya 1-0-1-0, Dilshan 1-0-1-0