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! pic.twitter.com/FosdwNysGk

— 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 ❤️ pic.twitter.com/ZbGC4jKAF4

— 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. pic.twitter.com/tJ5SN1gBrW

— Chris Haydon (@Haydonsmovies) August 13, 2016

So saddened by the news. Thank you, Kenny Baker. You will be missed. #RIP #MTFBWY 🙏 pic.twitter.com/cO1TsSgAbn

— Starwarsgirl75 (@Starwarsgirl75) August 13, 2016

Rest in peace, Kenny Baker. A little man who brought a little robot to life and changed the universe ❤️ pic.twitter.com/1E65sQX5ac

— Brian Altano (@agentbizzle) August 13, 2016

RIP, Kenny Baker. You're with Ackbar now. pic.twitter.com/6OB6LpJcBT

— Chris Edwards (@CineWipe) August 13, 2016

Goodbye, Kenny Baker. pic.twitter.com/2L72s49WpE

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

You brought life to one of my favourite characters, thank you Kenny Baker. Rest in peace. pic.twitter.com/9L53J5rN17

— Rahul Kohli (@RahulKohli13) August 13, 2016

RIP Kenny Baker. Thank you for being such a major part in so many millions of childhoods. pic.twitter.com/XfAFiGySPp

— Lando Calrissian (@CapeLando) August 13, 2016