LONDON — Glastonbury, one of the world’s most prominent and pioneering music festivals, announced its cancellation on Wednesday in a statement on Twitter.

“Clearly this was not a course of action we hoped to take for our 50th anniversary event,” said the statement, signed by the festival’s organizers, Michael and Emily Eavis. But with the coronavirus pandemic growing, they added, “this is now our only viable option.”

The move comes two days after Prime Minister Boris Johnson of Britain urged the public to avoid large gatherings and to self-isolate. Museums and theaters shut their doors soon afterward, but many had hoped matters would improve in time for the summer festival season.