Indian captain Shubman Gill defended his decision to enforce the follow-on as his team were denied a win in the second Test in Colombo, thanks to a terrific rearguard action by the Sri Lankan batting line-up.

Sri Lanka held out for a draw against India with Sonal Dinusha's century frustrating the visitors on a final day that stretched deep into the last session.

India had enforced the follow-on after bowling the hosts out for 290 in reply to their first-innings score of 503/9, but Dinusha's 103 in the first innings and then an unbeaten 133 in the second kept Sri Lanka in the fight through 243.4 overs in the field for India. The result meant India closed out the two-match series 1-0, having already won the series opener.

With vital ICC World Test Championship points having slipped through their hands, Gill felt the match was a learning curve for him as a captain.

"Draw not hurting like a defeat. Situation wise, draw was credit to them, we hoped for a win so disappointing," Gill said.

"Things always don't go as per plan, so lot of learnings for me as well as a captain. I give 10/10 for the effort and intent of everyone," he added.

With India wary of losing time to weather and eager to maximise the overs available to force a result, Gill defended the decision to enforce the follow-on rather than bat again and set a target.

"I don't think follow-on backfired, we fielded for over 250 overs. We were anticipating (rain), wanted to take that chance. Had we not taken and had it rained, you would have asked why no follow on," he explained.

Dinusha's twin hundreds were the headline act, but the tail also played its part in denying India the wickets they needed to clinch the game on the final day, with the pitch offering progressively less help to the bowlers as the match wore on.

"Sri Lanka played really well. Days 3,4 and 5 - lbw and bowled was out of equation. We attacked initially but pitch became slower today. There was slow turn. Pitch became easier, we tried our best," Gill said.

"On Day 4 we created chances, had wickets come result could've been different," he added.

For Sri Lanka, the escape was built around Dinusha, playing just his fifth Test, he tackled the spinners expertly to bat through the best part of two full days across the two innings. Sri Lanka Head coach Gary Kirsten did not hold back in his praise.

"Never easy to come out to bat at number six. He is a smart cricketer. This innings today would go down in history of Sri Lankan cricket as one of the greatest match saving knocks. It was great to watch," Kirsten said.

The South African pointed to the tail's resistance on the final day, with Keshara Nuwantha holding firm alongside Dinusha before eventually being caught off Manav Suthar after lunch, and Lahiru Kumara adding crucial time at the crease further down the order.

"I always say in the team that you are not a batter or a bowler, you are a player. We encourage our bowlers to bat and practice. Lahiru Kumara batted around 150 balls," Kirsten said.  

Reflecting on the opposition, he had words of praise for the two centurions.

"Dhruv Jurel is a world-class player, plays short ball well. Devdutt Padikkal and Jurel stood out for me from Indian team," Kirsten said.