Kusal Mendis has paid tribute to outgoing Sri Lanka batting coach Thilan Samaraweera, and hopes to complete a double-hundred on day five, as a leaving present for a man who has seen him through tough times both professionally and personally.

Samaraweera, who has been the team's batting coach for a year, is due to be replaced by former Durham coach Jon Lewis at the end of the Test series. Mendis went through one of the leanest periods of his career in the past few months - hitting only one fifty across formats in 23 innings between mid-June and mid-November - and credits Samaraweera with helping him out of that rut.

"I'm really thankful to Thilan aiya because I was in a really low place - I had failed about 15 one-dayers, and still the coach (Chandika Hathurusingha) and Thilan aiya refused to drop me," Mendis said after batting out the entirety of day four in Wellington, hitting his sixth Test ton in the process. "They let me play Tests again. I was only only able to get here because they stood by me. Thilan goes after the next Test, but I'm really thankful to him. I was only able to do this because of them."

Mendis revealed that Samaraweera had taken an interest in his career long before he had taken up an official role with the Sri Lanka side. In early 2017, when Samaraweera was serving a short stint as Bangladesh's batting coach - also under head coach Hathurusingha - Mendis had hit 196 against Bangladesh in Galle, falling four short of a double ton. Samaraweera had then sought him out and given him advice despite having been the opposition's batting coach.

"I remember one time in Sri Lanka, I got out for 196. Thilan was coaching Bangladesh at the time. He told me: 'You will later realise what you've done. You've got more talent than that. To be able to score 200 at your age means you've got a big future.'Then when he had become our coach, I missed a double-ton again, against Bangladesh (making 194 in Chittagong earlier this year). He told me the same thing again."

Mendis said he was determined to make the double-century happen on day five. Provided the weather stays good, he will resume his innings on 116.

"Before this Test he told me: 'Before I leave, hit a double-hundred.' So I'm trying my best to score a double for him. He's helped me so much. Everyone in the team knows how much he's helped. Not just on the cricket side of things, but he's helped me personally as well."