Michael Sleggs, who starred in the BBC Three mockumentary This Country, has died aged 33.

The actor’s death was announced by his friend, the actor Camilla Alicia-Bates, who said that he passed away late on Tuesday. Sleggs had revealed on Facebook that he had been placed on palliative care due to heart failure and only had a short time to live.

A long-time friend of This Country’s sibling stars, Charlie and Daisy May Cooper, Sleggs was cast on the show as Michael “Slugs” Slugette, an annoying neighbour of the show’s protagonists, Kerry and Kurtan. The character had terminal cancer in the show, mirroring the actor’s own health issues. The role was Sleggs’ only onscreen credit.

In May, Sleggs wrote on Facebook that he had been told by doctors that he only had a short time to live. “Hi friends, as a lot of you are probably aware I’ve spent a lot of time in and out of hospital over the past few months,” he wrote. “This last time it was decided I was reaching the end of options so they’ve sent me home on palliative care to live out the remainder of my days at home.

“As you can imagine this isn’t the ideal way I wished things to go and my family are dealing with a lot of grief. Just wanted to say I love everyone reading this status so much, you have all been such amazing, kind, caring people who have all touched my life in so many unique and incredible ways,” he added.

The actor suffered heart failure in March, but said, in another Facebook status, that he had made a “miraculous” recovery.

Writing on Twitter, This Country screenwriter Simon Mayhew-Archer said that Sleggs “encapsulated the spirit and humour” of the show. “He was a fantastic, talented man who brought tremendous joy to all who knew him & saw him. I loved working with him & will miss him,” he added.

Michael encapsulated the spirit and humour of This Country. He was a fantastic, talented man who brought tremendous joy to all who knew him & saw him. I loved working with him & will miss him. — Simon Mayhew-Archer (@SimonMAlikesyou) July 10, 2019

This Country, which follows two cousins living in a quiet Cotswolds village, first aired in 2017 on BBC Three and soon became a critical and commercial hit. A second series of the comedy was broadcast in 2018, with a third commissioned by the BBC this year.