Virat Kohli has stepped down as India's Test captain after their 2-1 series loss in South Africa.
Kohli, 33, made the announcement in a social media post on Saturday, a day after the Proteas beat India by seven wickets in the third Test at Newlands.
"Everything has to come to a halt at some stage and for me as Test captain of India, it's now," he posted on Twitter after seven years in the high-pressure position.
Kohli, who quit as Twenty20 skipper after a debacle at the World Cup last year and then lost the ODI job, took over the India leadership across all formats from MS Dhoni in 2017.
Kohli added: "It's been 7 years of hard work, toil and relentless perseverance everyday to take the team in the right direction. I've done the job with absolute honesty and left nothing out there.
"There have been many ups and also some downs along the journey, but never has there been a lack of effort or lack of belief.
"I have always believed in giving my 120 percent in everything I do, and if I can't do that, I know it's not the right thing to do. I have absolute clarity in my heart and I cannot be dishonest to my team.
"I want to thank the BCCI for giving me the opportunity to lead my country for such a long period of time and more importantly to all the teammates who bought into the vision I had for the team from day one and never gave up in any situation. You guys have made this journey so memorable and beautiful.
"To Ravi Bhai and the support group who were the engine behind this vehicle that moved us upwards in Test Cricket consistently, you all have played a massive role in bringing this vision to life. Lastly, a big thank you to MS Dhoni who believed in me as a captain and found me to be an able individual who could take Indian Cricket forward."
In the Newlands Test, Kohli was involved in a controversy when he made his displeasure known through the stump microphone when SA captain Dean Elgar survived an lbw decision.
Several Indian players, Kohli included, were heard complaining about the decision and there appeared to be suggestions the broadcaster, SuperSport, was manipulating the technology.
The Board of Control for Cricket in India (BCCI) lauded Kohli for his contribution as India skipper.
"BCCI congratulates #TeamIndia captain @imVkohli for his admirable leadership qualities that took the Test team to unprecedented heights. He led India in 68 matches and has been the most successful captain with 40 wins," the BCCI wrote.