Alastair Cook had toughest ride as skipper - Jonathan Agnew

Alastair Cook
Alastair Cook's 24 wins as England Test captain is bettered only by Michael Vaughan, but his 22 defeats is unmatched

Alastair Cook never had it easy. He's had the toughest ride of all recent England captains.

As England's highest Test run-scorer he has always been admired for his batting, but there have always been questions, particularly over his tactics, during his 59-match reign as skipper, which he ended on Monday.

In a funny way, the constant criticism forced him to improve, to reflect on the things he had not done well and to try new things. I put this to him once and he laughed it off, but I still disagree.

He has been stubborn - an excellent quality for an opening batsman, not always ideal in a captain - and largely cautious, which is hardly surprising considering his mentor was predecessor Andrew Strauss, another skipper that favoured the attritional approach.

Media playback is not supported on this device

Alastair Cook becomes first Englishman to reach 10,000 Test runs

The most difficult time for Cook was in 2014, which began with the Ashes whitewash down under, moved on to the Kevin Pietersen saga and was followed by a home series defeat by Sri Lanka.

He found a measure of redemption in the subsequent victory over the touring India side, but the year still ended with him being sacked as one-day captain.

To this day, he thinks that was the wrong decision, but he is in a minority. He was no longer worth his place in the side and he had to go. It also may have aided England's bid to regain the Ashes in 2015, which few at the time gave them much hope of doing. That success, to go with Cook's 2013 Ashes win as skipper is a highlight of his reign. So too, the triumph in South Africa in 2015-16 and the historic win in India in 2012, England's first there in 27 years. Time will prove what a good result that was - England are miles away from doing it again.

But there were also the disappointments. As well as the thumping in Australia and the loss to Sri Lanka, there was a defeat by India at Lord's on a made-to-order green seamer and a 1-1 draw away to a poor West Indies team.

Cook's winning percentage of 40.67 is only the fourth best of the six captains to have led England in more than 40 Tests. The two skippers with a worse record, Michael Atherton and Nasser Hussain, did not have the world-class talents of Pietersen, Graeme Swann, James Anderson and Stuart Broad, or the emerging Joe Root, Ben Stokes and Jonny Bairstow at their disposal. It has been an up-and-down ride.

Media playback is not supported on this device

Alastair Cook: England's record breaker

Will Cook be defined by the way in which Pietersen's international career was ended? The two men will inevitably always be linked, but that would be to ignore the fact that Cook welcomed Pietersen back into the England side when many captains in his position could have quite easily taken the opposite stance.

When Cook took over in 2012, Pietersen was in exile for his part in text messages sent to the South Africa team about former skipper Strauss. Cook oversaw Pietersen's 'reintegration' and the star batsman responded, playing a pivotal role in that triumph in India.

But, as we now know, the relationship deteriorated on the fateful tour of Australia a year later, with Cook eventually having a hand in Pietersen's international career being ended.

Some will say that there was nothing that Cook could have done, others will think that the captain should have seen those problems approaching and done more to manage them.

Alastair Cook
Cook became the first England batsman to reach 10,000 Test runs in the summer of 2016

What is unarguable is that the vitriol that Cook faced on social media from certain individuals in the aftermath of the Pietersen affair was nasty, personal and uncalled for.

Views were expressed, most of them by people who do not know Cook. Lots of them were depressing.

Indeed, it could be said that he was the first man to serve as England captain in a world that has been fully gripped by social media - though Cook himself has no interest in putting his views out online or anywhere else.

At the time, I thought he was getting some very rough treatment over the Pietersen issue and I was happy to say so publicly. Maybe because he saw me as an ally, we have always had a very good working relationship during his time as captain.

I have interviewed him well in excess of 100 times and can say that he is not a natural speaker. He sees media responsibilities as something to be endured rather than enjoyed.

There have been times when we have agreed, others when we have disagreed and when I have criticised him. The task of being honest about a player, but fair enough that they will still speak when you put a microphone under their nose, is a tightrope a sports journalist must walk.

Media playback is not supported on this device

Cook mocks Aggers over pedicure picture

We have also had our moments of fun.

Just on this last tour of India, I was cajoled into having a pedicure by an Indian barber. Who should walk in, but Cook, complete with camera. He took great delight in showing the photo to everyone he could find, as well as making sure he got it out to the world. I let him enjoy that one.

And so he departs. For Cook, the nature of the end of his tenure as captain very much reflects the type of man he is.

There was no chucking it all in at the end of the fifth Test against India, a shambles in Chennai. That's not his style. Like his batting, he was patient, he weighed it all up and considered his options. He went back to his farm and away from cricket, he no doubt had many conversations with his wife Alice. They really are a team and it was Alice who talked Cook out of stepping down in 2014.

This, though, is different. The extended period of time taken to mull over his future shows that Cook has made the right decision for him.

He will be incredibly comfortable with what lies ahead. That is likely to be scoring many more runs for England.

Jonathan Agnew was speaking to BBC Sport's Stephan Shemilt.