The overnight pair batted through the entire second day's play here on Friday as Sri Lanka amassed 485-2 in their first innings by stumps, a lead of 316 over South Africa's meagre first innings total of 169.
Left-handed Sangakkara ended the day at 229 not out, his fourth Test double-century and the second in successive matches against South Africa.
Skipper Jayawardene walked off the Sinhalese sports club (SSC) with an unbeaten 224, his third double hundred, and ensured the hosts were well-placed to take the lead in the short two-match series.
Only one partnership has been bigger in the history of Test cricket: 576 for the first wicket by Sri Lankans Sanath Jayasuriya and Roshan Mahanama against India at the Premadasa stadium here in 1997.
Sangakkara, 28, who was freed of his dual role as wicket-keeper after Sri Lanka opted to play a specialist keeper in Prasanna Jayawardene, batted fluently to strike 31 boundaries.
His 29-year-old captain also produced glorious stroke-play at the other end, helping himself to 27 fours and a six that brought up his double-century.
When South Africa last played Sri Lanka two years ago, Jayawardene scored 237 in the first Test in Galle and Sangakkara hammered 232 in the second Test at the SSC.
Memories of that assault returned to haunt the South Africans as the duo flayed the bowlers at will, scoring 99 runs in the morning session, 93 in the post-lunch period and 165 after tea.
The pair had come together on the first evening with Sri Lanka on a shaky 14-2 after seamer Dale Steyn removed openers Sanath Jayasuriya and Upul Tharanga in his first two overs.
South Africa, already without regular captain Graeme Smith and Jacques Kallis, missed veteran all-rounder Shaun Pollock, who opted out of the first Test following the birth of his second child.
Pollock, who arrived here late Thursday, will be available for the second Test which starts at the Sara stadium here on August 4.
Stand-in captain Ashwell Prince rotated his five specialist bowlers in hot and humid conditions and even brought on part-timers Jacques Rudolph and himself, but few deliveries beat the broad bats of Sangakkara and Jayawardene.
Sangakkara reached his century 30 minutes before lunch when he lofted Nicky Boje for two runs, the ball narrowly eluding a diving Rudolph near the mid-wicket fence.
Jayawardena, 99 at lunch, completed his hundred off the first ball after resumption, pulling Steyn to the fine-leg fence for his 14th boundary.
Sangakkara raced to 203 by lofting Rudolph for his 27th boundary and Jayawardena moved to 205 with a six over long-on against the same bowler.