LazyTown actor Stefan Karl Stefansson has died at the age of 43.

A spokesperson for the family told TMZ that he died on Tuesday surrounded by friends and family.

Fans have paid tribute to the popular star who played villain Robbie Rotten in the hit children's TV show.

The Icelandic actor had battled bile duct cancer for two years before his tragic death and shared his journey on social media.

He was first diagnosed with cancer in 2016 and after surgery it seemed he was on the road to recovery.

(Image: BBC) (Image: Instagram)

However, it sadly returned in 2018 and he revealed to his fans in an emotional Twitter post that his cancer was inoperable.

He said in a statement in March: "It’s not until they tell you you’re going to die soon that you realize how short life is.

"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."

Stefansson, who lived in Los Angeles with his family, was father to three daughters and one son.

(Image: Instagram)

His wife, actress Steinunn Ólina Þorsteinsdóttir also posted a statement about her husband's diagnosis earlier this year.

She said: "Even though I knew for a long time that this day would come, it's a difficult turning point.

"There is no cure for this. Now he will have to undergo chemotherapy to try to prolong his life and we hope that this will go as well is possibly can, to improve how he feels and to prolong his life."

She added: "His illness has had an impact on the whole family, naturally.

"Some days we feel very low, some days we are happy and are happy about all that we have accomplished together and lived together.

"Nobody can take that away from us, however this goes. Not even death itself."

(Image: Twitter)

(Image: Instagram)

In a poignant last Instagram post in June 2017, Stefansson thanked his followers for their support.

He posted an image of a rainbow with the words: "At the end of every storm there is a rainbow of hope."

This was accompanied with the caption: "From the bottom of my heart I thank you for the support you provide me. You give me hope and you all move me."

Many fans grew up with Stefansson on their TV screens during their childhood.

He was best known for playing the villain Robbie Rotten in the iconic children's show initially between 2004 and 2007 before returning again from 2013 to 2014.

During the first few years of the Nickelodeon series he didn't know any English but quickly became fluent.

Tonnes of grieving fans took to Twitter to pay their respects.

One fans said: "I'm so sad to hear that Stefan Karl Stefansson (LazyTown's "Robbie Rotten") has passed away. I'm happy he was able to embrace the enormous love of his fans before he passed."

Another added: "R.I.P Stefán Karl Stefánsson, thoughts and prayers to all family affected in this awful moment. Cancer sucks.

"However, you were brilliant in lazy town!! Always preferred Robbie Rotten to any other character. Peace out."

A third said: "Stefan Karl Stefansson, the actor who played #robbierotten in Lazy Town, the legend himself, has died by the hands of cancer on the 21st of August of 2018, he will be missed and he will forever stay in my heart for making my childhood amazing, Rest in Peace... "