Although Thilan Samaraweera ended his career as one of Sri Lanka's most prolific batsmen in home Tests and one of their more consistent players away, he is likely to be remembered for two very contrasting episodes. The first was the unfortunate injury he suffered on the ill-fated tour of Pakistan in 2009 when the Sri Lankan team bus was fired upon. The second, however, was his brilliant performance in the series in South Africa in 2010-11 where he scored two centuries in the second and third Tests in Durban and Cape Town.

In a team filled with batting stars like Kumar Sangakkara and Mahela Jayawardene, Samaraweera was the ideal foil and quite often proved to be a tough batsman to dislodge in the middle order. Like most Sri Lankan batsmen, he was most comfortable in home Tests and struggled to hit top form most times when Sri Lanka toured outside the subcontinent. Only three of his 14 centuries came outside Asia but the two he scored against South Africa stand out because they came against the most potent pace attack in bowler-friendly conditions.

Samaraweera played a total of 81 Tests scoring 5462 runs at an average of 48.76 (14 centuries). In 45 home Tests, he was very prolific scoring over 3000 runs at an average of 53.84 (eight hundreds). Of his six away centuries, only three were scored outside the subcontinent (average 35.96). He tasted a lot of success against Bangladesh (600 runs at 66.66) and Zimbabwe (254 runs at 84.66). However, his record was very good against top teams (excluding Bangladesh and Zimbabwe) too; in 68 Tests, he scored 4608 runs at an average of 46.08 with 12 centuries and 23 fifties. He is one of only six Sri Lankan batsmen to score over 2000 runs in Test wins. His average (58.59) and tally of centuries (9) in wins are third behind the corresponding numbers of Sangakkara and Jayawardene.

Thilan Samaraweera's record in Tests
  Matches Runs Average 100/50
Overall 81 5462 48.76 14/30
Home 45 3123 53.84 8/18
Away 36 2339 43.31 6/12
In Subcontinent 60 4275 54.11 11/24
Outside Subcontinent 21 1187 35.96 3/6
Top teams 68 4608 46.08 12/23
Wins 35 2461 58.59 9/11

Samaraweera made his debut against India at the SSC and scored a century in Sri Lanka's innings victory. Between his debut and the end of 2005, he had a modest run, scoring 1329 runs against the top teams at an average of 39.08 with three centuries. Each of his first three hundreds (one against Zimbabwe) was scored at the SSC before he broke the sequence with a century in Faislabad in 2004. In the second phase (2006-2009) of his career, he was far more prolific. In 20 Tests (against top teams), Samaraweera scored six centuries and averaged 56.61. He also scored the first of his three centuries outside the subcontinent during the same phase (against West Indies in Trinidad). He started the Pakistan tour in 2009 with a bang, scoring double-centuries in Karachi and Lahore, before being injured in the gunmen's attack. He added two more centuries against New Zealand in the home series later that year.

Samaraweera started the home series against India in 2010 with a duck in Galle but proceeded to score 76, 137 and 83 in the next two Tests. His 83 in the second innings in Colombo helped Sri Lanka recover from 125 for 8 and post a competitive target of 257 (India won by five wickets). On the tour of South Africa in 2011-12, Samaraweera produced what is arguably his best series performance when he scored consecutive centuries, in the process enabling Sri Lanka achieve their first ever win (Durban) in South Africa. His career graph, however, plummeted after the high of South Africa. In the next ten Tests, he managed to aggregate only 440 runs at an average of 24.44 with three fifties.

Samaraweera's career in phases (against top teams)
  Matches Runs Average 100/50
Phase 1: 2001-2005 24 1329 39.08 3/7
Phase 2: 2006-2009 20 1755 56.61 6/7
Phase 3: 2010: 2013 24 1524 43.54 3/9
Overall 68 4608 46.08 12/23

Throughout his career, Samaraweera never quite managed to get on top of the Australian attack. In home Tests, he had moderate success (231 runs at 33.00) but struggled to find form in Australia (215 runs at 17.91). In ten matches against Australia, he managed to score just two half-centuries. Against England, he did much better in home Tests (average 46.37 with one century) but was less successful away. Samaraweera had an excellent run against both New Zealand and West Indies both home and away, scoring three centuries and nine fifties in 17 matches (both teams combined). His record against South Africa was boosted by his run in the 2011-12 away series (339 runs at 67.80).

Samaraweera boasts terrific numbers against India in home Tests (652 runs at 130.40 with three centuries) but has ordinary batting stats in India (193 runs at 24.12 with no century). Against Pakistan, however, the numbers are reversed. In home Tests, he averages just 29.42 (no century) but in Pakistan, he scored 633 runs at an average of 90.42 with three centuries. Samaraweera's average of 90.42 is the third-highest among batsmen who have scored 500 or more runs in Pakistan.

Samaraweera against top teams home and away
  Home (Matches/Runs) Home (Average/100s) Away (matches/runs) Away (average/100s) Overall (matches/runs) Overall (average/100s)
Australia 4/231 33.00/0 6/215 17.91/0 10/446 23.47/0
England 5/371 46.37/1 5/219 27.37/0 10/590 36.87/1
India 7/652 130.40/3 6/193 24.12/0 13/845 65.00/3
New Zealand 4/447 63.85/2 2/178 59.33/0 6/625 62.50/2
Pakistan 8/412 29.42/0 5/633 90.42/3 13/1045 49.76/3
South Africa 2/74 24.66/0 3/339 67.80/2 5/413 51.62/2
West Indies 8/446 49.55/0 3/198 49.50/1 11/644 49.53/1
Overall 38/2633 49.67/6 30/1975 42.02/6 68/4608 46.08/12

Against top teams, Samaraweera enjoyed a much better run of scores in the team's first innings. While he averaged just over 50 in the first innings (ten centuries), his average dropped below 40 in the second innings (two centuries).

In the match's first innings, he averaged 57.88 with eight centuries and six fifties. In the next three match innings, he averaged 40.46, 43.15 and 32.08 respectively. His association with Jayawardene yielded 3247 runs at an average of 61.26 with 11 century stands. The partnership average (61.26) is the best ever for Sri Lanka and the ninth-best overall among pairs with 3000-plus partnership runs.

Since gaining Test status, Sri Lanka have always been plagued by the inability of the batsmen to perform consistently outside the subcontinent. Till the Boxing Day Test in Durban in 2011, Sri Lanka had failed to win a single Test in Australia, South Africa and India. Samaraweera, who had failed to convert on starts in both innings in the first-Test defeat in Centurion, scored 102, 43 and 115 in three of his next four innings as Sri Lanka managed to clinch the game in Durban and take the series to a decider in Cape Town. Samaraweera's run-aggregate in the series (339 runs) is the third-highest by a Sri Lankan batsman in a series outside the subcontinent (three-Test series). Although Aravinda de Silva and Asanka Gurusinha have managed higher series aggregates, Samaraweera's effort stands out because of the nature of the bowling attack and the conditions. His aggregate is also the highest ever by a subcontinent batsman in South Africa and the sixth-highest by a visiting batsman in a three-Test series in South Africa since South Africa's readmission in 1991. There have been only two other series (against top teams) when Samaraweera has managed a higher aggregate.

Top series performances outside Asia by Sri Lankan batsmen (against top teams): three-match series
Batsman Opposition (year) Matches Runs Average 100/50
Aravinda de Silva New Zealand (1991) 3 493 98.60 2/1
Asanka Gurusinha New Zealand (1991) 3 370 74.00 2/2
Thilan Samaraweera South Africa (2010-11) 3 339 67.80 2/0
Marvan Atapattu England (2002) 3 277 55.40 1/1
Mahela Jayawardene England (2002) 3 272 54.40 1/1

Like most subcontinent batsmen, Samaraweera played spinners far more comfortably than pace bowlers. He was dismissed only 34 times by spinners and averaged 72.55 against them. In contrast, he was dismissed 66 times by fast bowlers and managed an average of 40.75. His record against Saeed Ajmal, however, is very ordinary. Ajmal dismissed Samaraweera five times at an average of just 7.62 (27.71 balls per dismissal). Samaraweera was also dismissed four times each by Harbhajan Singh and Shahadat Hossain (averages of 43 and 26.25 respectively). Mitchell Johnson and Jermaine Lawson, who dismissed Samaraweera three times each, had excellent averages of 12.00 and 5.66 against him.

Samaraweera against top bowlers
Bowler Runs Balls faced Dismissals Average Balls per dismissal
Saeed Ajmal 61 194 7 7.62 27.71
Harbhajan Singh 172 371 4 43.00 92.75
Shahadat Hossain 105 197 4 26.25 49.25
Mitchell Johnson 36 102 3 12.00 34
Zaheer Khan 78 129 3 26.00 43
Jermaine Lawson 17 30 3 5.66 10

Madhusudhan Ramakrishnan is a sub-editor (stats) at ESPNcricinfo