Dilshan propels Sri Lanka to 267 in second ODI
Sri Lankan batsman Tillakaratne Dilshan plays a shot during the second One Day International match between South Africa and Sri Lanka at the Pallekele stadium in Pallekele on July 9, 2014 - by Ishara S. Kodikara
Dilshan struck nine fours in his quickfire innings after Sri Lanka won the toss and chose to bat in the day-night match at the Pallekele International Stadium.
The hosts looked in line for a bigger total but lost their last five wickets for 11 runs, with paceman Ryan McLaren (4-48) accounting for four of these dismissals.
South Africa, who won the opening game on Sunday by 75 runs, will need to score at 5.36 an over to win the game and seal the three-match series.
The Proteas suffered an early setback when pace spearhead Dale Steyn had to leave the field after sustaining a bruise on his right thumb while bowling his third over.
Sri Lanka were off to a flying start with Dilshan going after the attack, but the visitors struck at regular intervals to peg back the scoring.
Opener Kusal Perera (seven) was the first to go, lobbing the ball tamely to Hashim Amla at short mid-wicket off fast bowler Vernon Philander (2-49).
Kumar Sangakkara, who scored a fine 89 in Sunday's match, was out for seven when he tried to pull a short delivery from Morne Morkel but ended up gloving it to the wicket-keeper.
Leg-spinner Imran Tahir (2-41) got rid of Lahiru Thirimanne (36) and then off-spinner Jean-Paul Duminy deceived Dilshan with a ball that deflected off the batsman's glove onto the stumps.
Jayawardene was given out lbw when he was on six but the decision was overturned on review.
He went on to score a patient 48 off 70 balls and shared a 71-run stand with skipper Angelo Mathews (34) to steady the innings.
Ashan Priyanjan provided some late impetus, hitting Morkel for a six and a boundary off consecutive deliveries in a cameo 25-run knock.
The third and final game will be played in Hambantota on Sunday.