It was, to the average London commuter, something of a shock. Boarding at St Paul's and alighting at the Kia Oval, Alastair Cook had used the underground to get to work last Friday: the last Friday of a 12-year career in Test cricket that only four others have bettered in the volume of its return. After complete peace on the Central Line, a few of the regulars on the Northern Line recognised him - one in particular did a splendid double take - others simply did what they always do, with heads buried in newsprint or screens.

In the dressing room that has seen a raft of end-of-term triumphs, our hero slipped out of his casuals, into training gear and onto the outfield for a game of football. England do this every morning: it's splendidly laddish and fun, if not very Cook. He is no Jonny Bairstow, or even Chris Woakes for that matter, but he plays okay, and the most fun for all of them is to beat Ben Stokes in goal.

Joe Root won the toss and chose to bat on a pitch with a little more grass than usual, a very un-Oval-like furry sort of grass that no one seemed able to explain. It has been the summer of snakepits, so Cook was hardly surprised. He expected to play and miss a bit and hoped that by the time he came to edge one, there were some runs in the bank. He has never been much bothered by playing and missing; "It's the job," he says with phlegmatic calm, "the trick is to play the next ball as if the last one never happened."

What did surprise him, though, was the reception as he began his journey to the middle. As one, the crowd stood the minute the whisper came that he had emerged from the dressing-room door. Briefly he lingered, leaning over his bat, rehearsing his set-up, playing the odd imaginary stroke from the privacy of the player's balcony. Through the window panes and their white metal divides, it was as if he were a series of still photographs, each one of them worthy of first choice from the contact sheet. He is, after all, a photogenic fellow.

By now the spectators in the Bedser stand, had scrummed down near the steps, phones and cameras at the ready to record this little piece of history. Then he stepped out, into the limelight, and to the cacophony of applause. I say applause rather than cheers because this was Cook, not Botham or Flintoff, for example, who would have demanded equal respect but of an altogether different kind. By the time Cook reached the field, the noise was loud - really loud - and seemed, he said, to wrap itself around him. That warmth was something he will never forget.

Then Virat Kohli placed his men in two lines, a guard of honour through which Cook walked with typical shyness. There were some handshakes and good wishes of mixed emotion. Over the years, India have seen a lot of Alastair Cook. His finest batting came across three Test matches in India in 2012. Ted Dexter had always thought that the best batting he saw from an Englishman was Geoffrey Boycott's unbeaten 142 in the first of the two Sydney Tests on Ray Illingworth's tour in 1970-71. Until, that is, Cook and Kevin Pietersen played out of their skins in Mumbai in 2012. Dexter now has that partnership atop his tree. Cook himself has a soft spot for the match-saving double hundred in Brisbane, but if it's the all-round game and the occasional bursts of fluency and invention, Ahmedabad, Mumbai and Kolkata stand alone. He played better in India on that tour than any outsider has done before or since. Thus, the mixed emotions: Indian players both proud to give the guard of honour and relieved to see him go.

Upon reaching the middle, Cook did the usual. He marked his guard with a drag of the stud, a routine he repeats every ball - his line in the sand, one supposes. Then he walked to square leg, twirled the bat in his hands, stood with his feet spread almost at 10 to 2, sucked at a little more air, and moved back to the crease and into his stance, ready again. And so it has been for the 26,562 balls he has faced in a white England shirt. We now know that these have resulted in a total of 12,472 runs but we didn't know - didn't dare dream, in fact - that more than 200 would be added during the last curtain call. In fact, AN Cook wondered if he would even get off the mark. After all, Bradman hadn't. Brendon McCullum once called Cook the Bradman of the day but Cook himself lives under no such illusions.

He described what happened next as unusual. The noise of the crowd, which was still mainly that warm applause, became a hum; the stands in which the people sat, defocused, almost to a blanket cover of white. "It was weird," he said, "sort of otherworldly." Now that the retirement decision had been made perhaps the tension, the edge even, had gone and the intensity and threat that was the norm of life in the engine room was missing? Or was his mind already floating away from Test cricket and into an ether yet to be discovered? "I don't know, but I was bloody nervous, albeit in a different way from a usual Test match morning. I feared making nought for a start, and once I was off the mark, I feared letting everyone down with a low score." The white-out lasted a while, eventually lifting just as the morning mist lifts from the sea.

Two taps and up comes the bat, held first at thigh height and then raised again, urgently, as an eager boy might raise a sword upon instruction to advance. During this process, his knees stay slightly bent, his shoulders a little open to the bowler, he head steady and his eyes level. It is all exactly the same as it was those many years ago in Nagpur. So, too, is the move back and across his stumps, that take him deep into the crease and ideally positioned for play off the back foot. Against all but Mitchell Johnson, he has had time to play the short ball. In Australia in 2014, Johnson was different gravy and blew them all away.

Back to The Oval and the autumn sunshine; no Johnson here, just Bumrah and Co. There was a well-timed shove, half-forward, through the covers and a crisp flick from his toes; then the jab-jab of a back-to-back cut and pull that the crowd particularly loved.

From afar, it was as if the weight of responsibility had been lifted from those strong military-square shoulders. Nudges, nicks, guides and glances have been the breadwinner, all made possible by what he first plays and then leaves alone - and boy, can the boy leave alone. Then it's the cut and the midwicket flip; the sweep, the pull, and the punch-drive past the bowler. Extravagance comes in the form of the cover drive, not more than once or twice a session, mind. It is within the parameter of these disciplines that the immense tally of runs has been made. He is a batsman of the long, slow drip. Tall, slim and elegant to look at; attritional and unforgiving to watch.

On 71, a hundred seemed a certainty but the flaw of recent years bit free from the day's sense of fantasy as a full ball at good speed around off stump, caught him on the crease and as he reached for it, zipped in to catch the inside edge of the Gray-Nicolls willow and cannon into the stumps. The shock was recorded by the silence. First a gasp, then nothing. It was over: 12,325 runs. At least for now. Applause broke out. In Box 23 of the Bedser Stand, Sir Mick Jagger, who was off to New York in the morning, said he would miss watching Alastair bat and that perhaps he might go to Essex next summer for his fix. The rest of us prayed for Act II of a play with a script clearly written by Alastair Cook himself.

Saturday, September 8
The tube again. Not recognised - it was pretty empty. More football. No net. The morning was spent watching Jos Buttler and Stuart Broad bat with increasing confidence. Cook is rather in awe of Buttler. "Great eye, soft hands, natural ball-player," he says. England make 332. Time to field.

At first slip he made his mark, pawing at the ground like an animal in the wild. A hundred and seventy-three catches for England in Test cricket, many of them standing there. He is a self-made slipper, more from necessity than ambition. Hours of practice have made good but not perfect. Of late a few have gone down. He hates that. Hates it.

He stands with his feet wider apart than most, and his hands on his knees until the bowler is at the point of release. Then the fingers spread, to point as one to the ground. It looks neither relaxed nor promising but when Ajinkya Rahane played loosely at Jimmy Anderson, the ball flew to first slip, where the incumbent looked safe as houses. Soon enough Rishabh Pant did the same; same endgame too. Safe Al, nicely balanced, back in form.

From end to end he jogged - neither particularly athletic nor in anyway unathletic. Often his hands are in his pockets. It is the 706th day he has run these lines for his country and there are just three to go. White-framed sunglasses are positioned above the peak of his cap, until the sun shines through and they are moved in position to protect his eyes. Later he is to be found at short leg - or Boot Hill as the pros like to call it - a place not for the faint-hearted and rarely for older bones. Armoured in leg guards, box and helmet, he stoically takes the knocks, spills a quarter-chance and throws himself to the ground in cover - all in the name of England. By the end of the second innings, he was to be found on the boundary. Boot Hill is not for men who are winding down the clock.

Sunday, September 9
A rumour has broken that he is almost immediately to begin a career in the media. Apparently Talksport, the radio network that won the rights to England's next three tours, have signed him up. Well, as it happens I have signed for Talksport myself, and though Cook's name has often been in conversation, this news has caught me by surprise.

We chat about the summer's pitches and have a laugh at the fact that he played and missed almost as much in the first innings here at the Kia Oval - usually a surface that favours batsmen - as he had done all round the country in the four previous Test matches. He has some sympathy for Keaton Jennings but adds that in the end, runs are the only currency for survival. Then I ask him about Talksport. He likes the idea, though not for a while yet. Alice, his wife, is due with the couple's third child, and there is the farm, of course.

By the middle of the afternoon, India have been bowled out for 292. Cook and Jennings hustle from the field to the dressing room, and for the last of 291 Test match innings, the Cook superstitions kick into gear. Shoes, pads, box, gloves, helmet, bat - all aligned on the body of the Englishman to have made the most runs for his country. To that man, the ten-minute gap between innings rushes by; to everyone else on the outside - in the stands, the corporate boxes, the hospitality rooms, the commentary studios and press boxes, it is an age.

The cameras picked him up first, a distant figure hovering inside the dressing-room door. The rehearsals followed exactly the pattern of the first innings. Then Jennings appeared and it was time to go. Again the ground stood to him: a salute to integrity, a recognition of dignity. Some among them will have looked forward and wondered what next; the vast majority would have looked back and thought, "Thank goodness." He was more nervous, he said, during those moments than at any time in the game, for the fear of failure is an ugly thing.

The first deliveries had to be left alone, another clattered into his thigh pad, others were blocked or mistimed. One golden chance to drive a half-volley was missed as he found himself stuck on the back foot and contorted - so frustrating, demeaning, infuriating! Time to retire.

Then a ball pitched back of a length and angled at his hip, arrived as if sent by the gods. Down came the bat from the top of its swing, to whip that ball past square leg and away to the boundary. Oh my goodness, how they cheered! Soon there was a vintage straight drive off Mohammed Shami, the one where he holds the follow-though position and walks after it; then a thrilling cut off Bumrah; a hard sweep against Ravindra Jadeja, and finally, glory be, a cover drive for the ages - so sweetly struck, the chase was futile.

He walked off unbeaten with 46 at close to half-past six, Root alongside him. It had not been exclusively pretty but the foundation had been laid.

Monday, September 10
The next morning was as if he had been transported back to Mumbai six years before. This was the Cook zone, where batting was simply part of a life well chosen and calmly lived. At 12.43, seventeen minutes before lunch and just four runs short of the dream, Cook cut to deep gully and trotted the easy single. The fielder was Bumrah who fired a wild throw at the non-striking end, so wild that the head groundsman fetched it out of his shed. "'Three more to go,' I thought," he said. "Hang on a minute... hang on... and then the whole place erupted!"

Had Root not taken guard and urged Jadeja to bowl on, the crowd would still be applauding. It was, frankly, one of the most wonderful things you will ever see - the conversion of a humble cricketer into a national treasure. By his own admission, two separate raises of the bat for the same hundred is a bit greedy but what else was there to do when love was in the air? These things are unexpected, driven as they are by the unpredictability of nationalism. But when they come, such outpourings show us humanity in its best sense, proving that we care deeply about old-fashioned virtues, high achievement and modesty. Both behind and in front of the scenes, Cook has done a great deal for English cricket. He is not bothered whether the rest of us know this, only that his efforts come to something. In short, he has earned our respect.

The effort is the other point, because it is so obviously not easy for him. David Gower was adored from the minute he eased his first ball, a short one from Pakistan's Liaqat Ali, to the square-leg boundary. Not many batsmen "ease" a pull shot. Cook was admired from the minute he crossed the continents to make 60 and a hundred in Nagpur, in his first Test, but it has taken him a long time to be so loved.

It was revealing to see the dressing room at the moment of his hundred. Anderson, a man given neither to hyperbole nor a love-in, jumped up and down like an infant child with a smile wider than Cook's. Out in the middle, Root hugged Cook like a mother might a child. In the crowd, the two fellows next to me knew all about Cook - his stats and records and history - and boasted of watching him make a couple of hundred in Brisbane and another at Edgbaston. How far and wide they travel!

An innings that had begun without promise - skittishly ineffective, you might say - had become one of the innings of his life. Later that night, he admitted the fear of embarrassment, especially after the second brain-numbing welcome to the crease. He was out straight after Root - the next ball, in fact. But it mattered not a jot. Everyone stood and this time cheered as if the Ashes had been won.

Each one of the Indian players came to shake his hand, a series of acts that seemed to surprise him. Halfway back, he stopped and turned to the crowd, raising his arms aloft in the way that a prizefighter celebrates a knockout. Then he was gone, up the steps and away to the sanity of the dressing room and a life of batting in the shires.

Tuesday, September 11
We are in the middle, 20 minutes before play. "It's all been a bit surreal," said Alastair. Indeed it has. "You couldn't have scripted it. I think we can say that sometimes dreams do come true," he added.

He sung in the choir at St Paul's and was a grade-eight saxophonist who won a music scholarship to Bedford School. In his first summer he was watching MCC play the school 1st XI when he was called upon to field because the visitors had arrived one short. Chasing down the school total, MCC lost a few wickets and told him to pad up. He made a hundred and MCC won the game. "Is that true?" I asked him. "'Fraid so," he replied.

Now he was back at slip, shuffling from end to end, sometimes carrying the helmet that short leg might need. No catches came his way and the one thing, the only thing, he really wished for was that James Anderson's 564th wicket would bring victory for England. Well, it did. Of course it did! "One hell of an achievement, the skill, the fitness, the courage to keep going, the longevity." Indeed. They are close friends - same peas, different pods.

Us Channel 5 folk interviewed him at the end and began by giving him a special bottle of champagne. I said, "Your whole career in England has been on Channel 5. You started in the summer of 2006, the day we started." "Well," he said, "you've lasted longer than me then." Only just, I reminded him. Might he consider changing his mind, given such pristine form in the match? "No! This incredible occasion confirms my decision. I'll miss the dressing room and the competition, but it's time to move on from everything else. It's been coming for more than a year now, not just from these past few months." A perfect ending, then? "Oh yes, a fairy tale...with a lot of hard yards to set it up." And Anderson? "England's greatest cricketer. We take him for granted but we shouldn't. It was so fitting that he knocked out middle stump to claim the record and the Test for England. It'll be fun tonight..."

Goodbye Cookie and good luck. The game is better for your place in its history.

Mark Nicholas, the former Hampshire captain, presents the cricket on Channel Nine in Australia and Channel 5 in the UK