Adrian Edmondson, who is known for starring in anarchic TV comedies The Young Ones and Bottom, is joining the cast of EastEnders.
The comic actor will be seen in the BBC One soap as Daniel Cook, a new love interest for Jean Slater, played by Gillian Wright.
The BBC said Edmondson had already started filming, with his first appearance to air later this summer.
His character is described as “charming and with a wicked sense of humour”.
He will be “the perfect antidote for Jean as she continues her treatment for ovarian cancer”, producers added.
The 62-year-old actor said in a statement: “There were only 15 boys on my drama course at Manchester Uni, and I’ll be the third to appear in EastEnders – so I feel it’s a kind of tradition! The other two being Tom Watt [Lofty Holloway] and Paul Bradley [Nigel Bates].”
- Grange Hill ‘icon’ Zammo to join EastEnders
After breaking through as a stand-up comedian in the 1980s, Edmondson found wider fame playing Vyvyan in The Young Ones and later as the manic Eddie Hitler in Bottom, which he also wrote with co-star Rik Mayall.
Since then, Edmondson has taken on more sedate roles in the likes of Holby City, Bancroft and War and Peace, as well as fronting a series about the Yorkshire Dales for ITV.
He is the latest comedian to move into the soap world, following in the footsteps of the likes of Bradley Walsh, Les Dennis and Vic Reeves.
EastEnders executive producer Jon Sen said: “Adrian’s a phenomenal talent who will bring his unique blend of intelligence, warmth and humour to the role of Daniel.
“We’re all over the moon he’s coming to Walford and can’t wait for this love story to hit screens later this year.”
Follow us on Facebook, on Twitter @BBCNewsEnts, or on Instagram at bbcnewsents. If you have a story suggestion email.
Kit Armstrong: From child prodigy to piano-playing superstar
Nigel Farage’s 400km pro-Brexit march sets off from Sunderland to London
Music show: La Chica, Danger Mouse, Karen O and Foals
McDonald’s: Tom Watson urges chain to drop Monopoly campaign
Christchurch shootings: Sajid Javid warns tech giants over footage
Study reveals the wolf within your pet dog
NHS let me down, says health manager with cancer
Looting, clashes as Yellow Vests seek new momentum