EastEnders stalwart Dame Barbara Windsor is leaving the show for good as it is revealed her famous character, Peggy Mitchell, will be killed off.
Viewers saw Peggy make an appearance in Friday night's episode as she told her son Phil (played by Steve McFadden) that her cancer had returned.
But unlike her previous storyline she will not win her battle against the disease and will die.
Windsor, 78, said despite her decision to leave the show for good, her love for the show would never change.
"Peggy is a character close to my heart but I made the decision a while ago that I need to say goodbye to Peggy once and for all, as otherwise she will always be there, urging me to go back, and that is something I need to shut the door on," she explained.
She said she had thought "long and hard about it", but had realised it was time to say goodbye to the character.
"And I thought that whilst the guvnor (Dominic Treadwell-Collins), who I adore, is still in charge I want him to be the one to oversee it. I am grateful that Dominic has accepted my decision and together, since late last summer, we have been secretly plotting Peggy's last scenes."
Friday night's episode marked the start of Windsor's last storyline on the show. The scenes were filmed secretly in November 2015.
Treadwell-Collins, the show's executive producer, said: "Barbara is the real guvnor of EastEnders.
"So when she told me her decision back in the summer, we both had a little cry before getting excited about how Peggy Mitchell, the matriarch to end all matriarchs, could bid her final farewell to Albert Square."
He praised Windsor for creating one of the "greatest ever characters on British television" and said her exit was the end of an EastEnders era.
He hinted at Peggy's exit on the show, saying it would be "one of the most heartbreaking, uplifting and epic exits an EastEnders character has ever had."
Windsor's final scenes are expected to transmit in late spring 2016.
Best known for her Carry On films, Windsor joined the soap to take over the role of Peggy in 1994 and played the character full-time until 2010. Since then she has made occasional returns over the years.
As the Mitchell family matriarch, Peggy's biggest storylines include her battle with breast cancer, her marriage to Frank, her feud and friendship with Pat Butcher and her marriage to Archie Mitchell, which resulted in the family losing The Queen Vic.