The actor who played R2D2 in the Star Wars films has died at the age of 81, his agent said.

Kenny Baker, who was 3ft 8in, found fame in 1977 playing the robot in the first Star Wars film and reprised the role in subsequent films in the hit franchise. He also appeared in Flash Gordon, Time Bandits and Mona Lisa.

Baker’s agent Johnny Mans said: “He will be sadly missed.”

(Joel Ryan/AP)

Mans said Baker had been ill for a couple of years, adding that he had been cared for by his nephew.

Ewan McGregor, who appeared in three Star Wars movies, led the tributes on Twitter, posting: “So sorry to hear about this. It was lovely working with Kenny.”

Daniel Logan who played young Boba Fett in the 2002 film Star Wars: Episode II – Attack of the Clones also tweeted.

So sad to hear one of my dearest friends passed away. Rest in peace Kenny Baker. Love you. Will miss you!

— Daniel Logan (@Daniel_Logan) August 13, 2016

As did his legion of fans.

RIP Kenny Baker, the man behind the world's favourite robot. Gonna be a shame not to see him at conventions any more. Rest In Peace.

— Daniel Wright (@danielmwright) August 13, 2016

Fly High Kenny Baker ❤️

— Berwyn Jones (@BerwynJones26) August 13, 2016

Rest in Peace, Kenny Baker. Your legacy will live on forever; spanning galaxies & stars. May The Force Be With You.

— Chris Haydon (@Haydonsmovies) August 13, 2016

So saddened by the news. Thank you, Kenny Baker. You will be missed. #RIP #MTFBWY 🙏

— Starwarsgirl75 (@Starwarsgirl75) August 13, 2016

Rest in peace, Kenny Baker. A little man who brought a little robot to life and changed the universe ❤️

— Brian Altano (@agentbizzle) August 13, 2016

RIP, Kenny Baker. You're with Ackbar now.

— Chris Edwards (@CineWipe) August 13, 2016

Goodbye, Kenny Baker.

— Dr Paul Coxon (@paulcoxon) August 13, 2016

You brought life to one of my favourite characters, thank you Kenny Baker. Rest in peace.

— Rahul Kohli (@RahulKohli13) August 13, 2016

RIP Kenny Baker. Thank you for being such a major part in so many millions of childhoods.

— Lando Calrissian (@CapeLando) August 13, 2016