LONDON — For fans of one of London’s most fabled nightclubs, the party is over.

This week, the local authorities shut down Fabric, a nightclub that helped put the British capital’s electronic music scene on the global stage and entranced a generation of clubbers from all walks of life. The message from officials was clear: The drug-fueled hedonism would no longer be tolerated.

The decision by the Borough of Islington to revoke the license of the 2,500-capacity nightclub came after the police had asked the borough council to close the venue after the deaths of two 18-year-olds in recent months. According to the council, both had taken MDMA, a drug better known as Ecstasy. In 2014, the police had also asked the council to review Fabric’s license after the deaths of four others in the previous three years were attributed to drugs.

Clubgoers, music critics and D.J.s who made their names at Fabric described the club’s demise as a blow for British culture and a threat to London’s place as a global capital of electronic music, for which Fabric was both a laboratory and a temple.