Ben Stokes was named the BBC Sports Personality of the Year, and England’s cricket World Cup winners the team of the year, as the annual awards ceremony in Aberdeen celebrated a strong year of sporting achievement.

The England batsman became the first cricketer to win the prize since Andrew Flintoff in 2005 after a summer of batting heroics during both the World Cup and the Ashes. The 28-year-old finished ahead of the six-time Formula One champion Lewis Hamilton, who came runner-up for a second consecutive year and fourth in total, and the world champion sprinter Dina Asher-Smith, who was third. The other shortlisted athletes were the footballer Raheem Sterling, the Wales rugby captain, Alun Wyn Jones, and the world champion heptathlete, Katarina Johnson-Thompson.

“It’s an individual award but it’s a team sport,” said Stokes on receiving the award. “The best thing is you get to share big moments with teammates and back-room staff. They make moments like this summer possible. Two years ago was a tough time for me in my life and I had so many people help me through that. I wouldn’t be up here without you, so thanks.”

Stokes was overwhelming favourite for the award having fulfilled more than one of the traditional criteria for success. He was a crucial part of a winning national team, scoring 465 runs over the course of 11 World Cup innings, with a batting average of 66.42. Perhaps more importantly, however, he delivered individual performances that grabbed the public attention. He made a decisive intervention in the World Cup final, first guiding England from a disastrous 68 for four to a tie at 241 with a score of 84 not out, then stepping to the crease again to score eight more crucial runs in an unprecedented ‘super over’.

In August he went on to give an even greater display of batting prowess in the third Ashes Test at Headingley. Stokes scored 135 not out as England chased down a target of 356 to claim victory in the third Ashes Test, with 74 of those runs coming in a last-ditch final-wicket partnership with Jack Leach. It instantly earned comparison with Ian Botham’s legendary displays against the Australians in 1981 and the former England captain Michael Vaughan went further, claiming: “I’ve never seen a better Test innings. Ever.”

This amazing sporting achievement also had a personal narrative, one Stokes alluded to in his winning remarks. Two years ago Stokes was arrested on charges of affray after a brawl outside a Bristol nightclub. Claiming he had become involved in a fight after trying to help a gay couple receiving homophobic abuse, Stokes went on trial last year and was eventually found not guilty of affray charges.

The BBC’s marquee awards event is always a mixture of the jaw-dropping and the tear-jerking. This year was no exception as recollections of Stokes’ heroics came alongside stirring tributes to Raheem Sterling’s anti-racist activism and a standing ovation for Dame Tanni Grey Thompson, the Paralympic pioneer who received the lifetime achievement award. “It’s been an amazing journey to see where the Paralympic movement is today,” Grey-Thompson said “Twenty years ago Nelson Mandela said sport has the power to change the world. I’d like to say to my family and friends, who helped sports change my life, thank you for putting up with me and I love you.”

The Scottish crowd played their part in the evening, laughing (and groaning) at jokes from the presenter Gary Lineker and cheering when Diego Maradona’s ‘hand of God’ goal appeared on the big screen. They gave a particularly rousing welcome to the winner of the Helen Rollason award , a prize which recognises sportspeople who have overcome adversity. Doddie Weir was diagnosed with motor neurone disease in 2016. The much-loved Scottish rugby international lock forward has since raised £5m for MND research.

Weir received his award from the Princess Royal, who is both president of the Scottish Rugby Union and royal patron of MND Scotland. “It’s a pleasure to see Doddie here. The reception indicates you are pretty well recognised,” she said.

Getting a large laugh from the crowd after observing that “as a Scottish rugby player from the 90s this is as close as I’ve got to a trophy”, Weir went on to thank his family and the public for supporting his new cause. “My passion is to find a cure for MND,” he said. “They say to enjoy the day because you don’t know what will happen tomorrow. So tonight will be a special day.”

The world sport star of the year was Eliud Kipchoge, the Kenyan long-distance runner who this year became the first man in history to run the marathon distance in under two hours. Kipchoge attended the award ceremony and in turn announced Keiren Thompson as the winner of the unsung hero award. The 31-year-old runs Helping Kids Achieve, an organisation which provides sporting clinics for children in a deprived area of Nottingham. Coach of the year was John Blackie for his role in coaching Asher-Smith since she joined Blackheath and Bromley Athletics club at the age of eight.