The Icelandic actor, who played the junk-food-munching villain in the children’s TV show, had been diagnosed with bile duct cancer

The Icelandic actor Stefán Karl Stefánsson, who played the villain Robbie Rotten in the children’s TV programme LazyTown, has died of cancer aged 43.

The news was confirmed in a Facebook post on Tuesday by Stefánsson’s wife, Steinunn Ólína. He had been diagnosed with cholangiocarcinoma, more commonly known as bile duct cancer, in 2016, but had surgery to remove it in 2017. However, Stefánsson announced earlier this year that the cancer had returned and was inoperable.

A trained puppeteer who attended the Drama Academy of Iceland, Stefánsson first appeared in a stage version of LazyTown – an educational programme that encouraged children to exercise and eat healthily – in 1999. He was later cast in a TV adaptation of the show commissioned by Nickelodeon.

The series followed the adventures of a pink-haired girl, Stephanie, and her athletic superhero friend, Sportacus, as they attempted to get the sedentary residents of a town to become more active. Attempting to thwart their plans was Stefánsson’s character, Robbie Rotten, who devoured junk food and sought to keep the town idle.

The series soon became a ratings hit and was sold to more than 180 countries. It ran originally between 2004 and 2008 and was revived in 2013, with Stefánsson reprising his role as Rotten. The actor also appeared as another villain, the Grinch, in a touring stage version of Dr Seuss’s How the Grinch Stole Christmas! between 2008 and 2015.

Stefánsson gave regular updates on his condition on social media. Writing on Twitter in March, before he deactivated his social media accounts, the actor confirmed that the disease had returned and that he would not be continuing chemotherapy treatment.

Facebook Twitter Pinterest Sportacus saves the day in LazyTown by defeating Robbie Rotten. Photograph: LazyTown Entertainment

“It’s not until they tell you you’re going to die soon that you realise how short life is,” he wrote. “Time is the most valuable thing in life because it never comes back. And whether you spend it in the arms of a loved one or alone in a prison cell, life is what you make of it. Dream big.”

In an Instagram post, the creator of Lazytown, Magnús Scheving, who also played Sportacus, paid tribute to Stefánsson. “Today the world is poorer. Stefan a great talent and a humang beeing [sic] passed away. My heartfelt for his friends and family. LazyTown will be empty without you,” he wrote.

Stefánsson is survived by his wife and four children.