When Mahela Jayawardene was a teenager, the locals in towns he played in would sometimes shut up shop, and flock to the ground to watch him play. In the early years he had not figured out he was the reason the crowds had swelled. Eventually the truth dawned upon him.

As he farewelled Test cricket, the thousands who had come to the SSC to see him off were allowed on to the ground, to form a giant huddle around their hero. There were warm embraces with his proud, emotional parents, his wife and daughter, his team-mates, and one quiet moment with his great partner-in-crime, Kumar Sangakkara. But on the day where he was the most wanted man in town, he still looked up every few moments to give his crowds a joyful wave.

He has been a world-class cricketer, admired the world over, mixing with presidents, meeting with royalty, and carousing with the wealthy and well-known. But to the people who have loved him at home he has never seemed like an A-lister. Almost 20 years after became a celebrity, Jayawardene has remained, unmistakeably, a man of the people.

Perhaps he has enjoyed those interactions most of all. He has posed for tens of thousands of pictures, signed countless caps, bats, notebooks and photographs. Yet instead of being ground down by the hubbub, Jayawardene has been buoyed by the public's love and admiration. He never fails to respond when a fan quips with him, rarely forgets to flash that wide smile when someone shakes his hand.

On a charity walk last year, a boy of no more than nine had waited for Jayawardene to come past since 5 am, so Jayawardene met him warmly and walked with him for as long as the youngster could come. He has always had that magic about him: that air of approachability and an easy, affectionate way. In a northern town last October, a group of squirming kids milled around metres away, a little too shy to approach. So he went to them instead, dropping to his haunches to flash that grin, eye-to-eye.

"I have played with a lot of pride and passion, and that's the same passion that the fans have, and the same passion that the entire nation has. It's quite easy to play for a country like that."
Mahela Jayawardene

"Playing for Sri Lanka is such a special thing because of the fans, and the way they support us," he said after stepping off the Test field for the final time. "I have played with a lot of pride and passion, and that's the same passion that the fans have, and the same passion that the entire nation has. It's quite easy to play for a country like that."

On Twitter, players from all around the world, from Kevin Pietersen to Adam Gilchrist to Harbhajan Singh, whom Jayawardene had scored many runs against, sent their tributes through. At the SSC, he had an unusually warm guard of honour when he came to bat for the last time. Even after having lost the series 2-0, Pakistan's players were joking with him on the boundary.

Jayawardene has played the game with passion and intensity, but he has always been about the people within and around the game as well. Cricketers across the spectrum, from the freakishly talented to the most working-class, claim he is the best captain they have played under. He has ruffled plenty of feathers as well, but his public interactions reveal a little of why he is such a highly rated leader.

"When I look back at my time with the Sri Lanka team, those memories are beautiful to me," he said. "We always played with a lot of joy, and a lot of good things happened to me personally, because I became a Sri Lanka cricketer. I am very lucky I got to have a job that was also my passion. I appreciate every moment I had. It's a privilege to be in the Sri Lanka dressing room."

There will be days when Sri Lankan cricket will feel Jayawardene's absence. They may miss him if Sri Lanka crumble on one of the bone-dry pitches that were his specialty. Fans might want for a player whose innings they can happily watch for hours, on loop. Sangakkara might get bogged down, and yearn his old friend to reverse the pressure at the other end. Angelo Mathews will almost certainly miss his tactical advice on long, tough days in the field.

But Jayawardene is gone now, 149 Tests into his career, six catches short of the Test record, 0.16 below that vaunted average of 50. But at least his team can be happy they gave him this last occasion among the people whose days he had filled with joy, and who had given him joy in return.

Andrew Fidel Fernando is ESPNcricinfo's Sri Lanka correspondent. @andrewffernando