India coach Ravi Shastri has defended the team selection during the three-match Test series in South Africa, which the visitors lost 2-1. Playing Rohit Sharma ahead of Ajinkya Rahane in the first two Tests and replacing Bhuvneshwar Kumar, India's best bowler in the tour-opener in Cape Town, with Ishant Sharma were singled out by critics as the two most controversial selections that played a big role in Virat Kohli's team losing a closely fought series.

Rohit's selection for the first two Tests in Cape Town and Centurion, Kohli reasoned, was based purely on his form. In the four innings he played, Rohit managed only 78 runs.

Although Rahane made only nine in the first innings in Johannesburg, his 47 in the second innings of the Test played a vital role in India winning the third match. Rahane showed he remained one of India's best at adapting and performing in conditions that support fast bowling, but Shastri pointed out it was not so simple considering Rahane was "struggling" with his batting and fielding.

Rohit finished 2017 on a high, including a double-century in the home series against Sri Lanka, which finished under two weeks before the Cape Town Test. In the past year, Rohit featured in two Tests and scored at an average of 217. By contrast, in the 11 Tests Rahane played last year, his average was 34.62.

Shastri said, given those numbers, there was no question of Rohit being benched for Rahane. "Right from the beginning, there was no doubt in the mind of the team management that Rohit was the batsman in form while Ajinkya was struggling, not just on the field but in the nets too," Shastri told Times of India. "Rohit was averaging more than 200 in Tests and had scored around 1200-odd runs in ODIs. So what does the team tell him? Your runs don't matter because that's how it works?

Performances count and that makes this whole talking point a no-brainer. We all know what Ajinkya is capable of, but before coming here, he was averaging about 30 all through 2017."

The other selection that raised eyebrows was when Indian did not field Bhuvneshwar Kumar for the second Test. He was replaced by Ishant, the senior-most fast bowler in the country. Shastri said Ishant was picked purely based on the slow nature of the pitch which did not assist swing bowling. "Watch India's first innings at Centurion," he said. "Quinton de Kock was keeping up front for Vernon Philander. That's how slow the wicket was. Bringing in Ishant made all the difference. He has been phenomenal. We knew Bhuvi had to be played at the Wanderers and, in fact, given the Centurion wicket - it had nothing for pace bowlers, leave alone swing - we knew Bhuvi would be fresh for the third Test.

"Ishant bowled beautifully in the first innings at Centurion, he got us both AB [de Villiers] and Faf [du Plessis] and what a tireless effort it has been from him. When did Ishant last bowl like this series? Not even Perth."

Shastri also disagreed with the viewpoint that constant fiddling with India's XI under Kohli's captaincy was proving to be detrimental to the team. "What chopping and changing?" Shastri said. "Sometime during the Centurion Test, Ajinkya was getting back into his rhythm. He was knocking well in the nets and Rohit was struggling, so we decided to do whatever looked better at that point in time and Ajinkya was in the XI. And he scored at the Wanderers.

"Dropping or picking Bhuvi was not chopping or changing. It was a decision taken according to the pitch and the conditions. It's simple, had we scored more runs in the second innings at Cape Town and the second innings at Centurion, this whole series would've been different."