South Africa took little time in closing out an innings and 45-run victory over a depleted Sri Lanka in the first test on Tuesday as the tourist's promising start to the match and the series was undone as a string of them left the field injured.

Four of the five Sri Lankans to get hurt during the test still came out to bat on the fourth day in a vain effort to save the test, but it did not matter.

South Africa's fast bowlers needed just over a session on the fourth day to finish of Sri Lanka's second innings. Sri Lanka, starting the day 65-2 and facing defeat, was bowled out for 180 in 46.1 overs.

READ | AUS vs IND: Sydney to host third Test, confirms Cricket Australia

Allrounder Dhananjaya de Silva was not able to bat because of his thigh injury, meaning South Africa needed just nine wickets in the end to win.

South Africa took five wickets in the day's first session and finished Sri Lanka off with the last two wickets less than half-an-hour after lunch, despite some resistance from Kusal Perera (64) and Wanindu Haranga (59).

South African pacers Lungi Ngidi, Anrich Nortje, Wiaan Mulder and Lutho Sipamla all collected two wickets each in the innings.

Sri Lanka's heavy defeat was the result of a marked turnaround in the test after the Sri Lankans made a strong start, posting 396 in the first innings for its best test total in South Africa.

But Sri Lanka was depleted by the stream of players leaving the field injured: de Silva left on the first day while batting, fast bowler Kasun Rajitha was injured on Day 2, and bowlers Lahiru Kumara and Wanindu Haranga and batsman Dinesh Chandimal were hurt on Monday.

The absence of frontline quicks Rajitha and Kumara especially exposed the Sri Lankan bowling attack and South Africa's batsmen were ruthless in the one innings it needed to settle the game.

The Proteas made 621 in its first innings, with 199 from Faf du Plessis, 95 from Dean Elgar and half-centuries from three other players.

Sri Lanka's injury woes have been partly caused by the coronavirus pandemic and the resultant lockdowns and curfews in its country, which gave the squad little chance to prepare for the tour to South Africa.

ALSO READ | AUS v IND: Tim Paine's Australia fined for slow over-rate

Sri Lanka had no three- or four-day warmup matches in the buildup to this series, with the players' only preparation a domestic Twenty20 competition.

The second test in Johannesburg follows quickly, starting on January 3.

"If the world was was normal I don’t think we’d be in this situation," Sri Lanka coach Mickey Arthur said, "because I think the conditioning would be perfect and I think the guys would be ready to go.

“Luckily we brought 21 players, otherwise it would be batting coach Grant Flower at No. 3 and me at No. 4 in the next test.”