It has been one disaster after another for Loxfest, as Ambridge's answer to Glastonbury has grappled with all-girl band Honey Storm pulling out and headlining act Quaintance Smith being cut from the bill after accusations of domestic abuse.

But fans of BBC Radio 4's farming soap opera The Archers will have been relieved to hear that all was not lost for the fictional music festival, as Friday's episode announced Pet Shop Boys would step in as the festival's last-minute headliners.

The pop duo, who are apparently longtime fans of the series, said it was "a thrill" to take part.

In Thursday's episode of the drama , Elizabeth Pargetter, owner of the Lower Loxley estate, and fellow organiser Roy Tucker were despairing over the future of their food and music festival when the bruises appeared on the arm of the girlfriend of Quaintance Smith's lead singer.

But the radio audiences and residents of Ambridge were saved from having to make do with an Abba tribute band or suffering through the wailing of a former reality TV star when it emerged that Pet Shop Boys, known for hits such as West End Girls, would be headlining alongside a mixture of fictional bands such as the Velvet Cowshed and Hideous Wellies.

Other more familiar names appearing on the Loxfest bill include Sheffield's indie-pop duo Slow Club and Luke Sital-Singh. Producers recruited BBC Radio 6 Music presenter Steve Lamacq to help curate the festival.

Lamacq, a regular listener to The Archers, said: "Loxfest is The Archers' storyline we've been waiting for. As someone who spends a lot of time covering festivals for the BBC, it was one we really wanted to be involved with. So when we first heard the rumours about the festival at the start of the year, we offered up our services, helping to suggest bands that might fit the bill. I'd have probably have gone down and helped them put up the security fencing if they'd asked.

"I've been a fan of The Archers off and on for more than a decade, but got hooked again about three years ago. You'd be surprised how many Archers fans there are in the music industry. Even the former stage manager at Reading festival would come up to me and ask to borrow my pocket radio when The Archers omnibus came on.

The special guest appearance by Pet Shop Boys, which was recorded at London's Maida Vale Studios last month, will be broadcast on Radio 4 on Monday night.

The band are not the first celebrities to make an appearance in the world's longest-running radio soap opera, with Ambridge formerly playing host to Dame Judi Dench, Alan Titchmarsh, Richard Griffiths and Princess Margaret over its 64-year history.