The Arches was one of Glasgow’s most popular nightclubs, renowned for its music and independent spirit. But last June the club closed down after its licence to stay open beyond midnight was revoked, making the business untenable.

The decision can be traced back to a Saturday night in February 2014. A 17-year-old girl called Regane MacColl fell ill at the Arches (which had an over-18s policy) and later died in hospital. She had taken “Mortal Kombat” – a pill with the image of a dragon printed on it – possibly before entering the venue.

In the months that followed, the police insisted that the Arches introduce “airport-style security”, says Scott Forrest, the club’s former music programme manager. Visitors were subjected to full-body searches on arrival and they weren’t even allowed to bring in chewing gum.

Those who had drugs on them were treated far worse there than at many other clubs, Forrest tells me. In a typical weekend, of the 2,000 people crammed into the venue, about 15 would be found to be in possession of illegal substances. “We followed the law to the letter,” he says. “Even people caught with a joint would be reported to the police. Everyone got searched, even artists and DJs.”

Yet the club’s success in finding and reporting those carrying drugs may have worked against it. “The police took the statistics and used them to close us down, which was just sinister,” Forrest says. Soon, the Arches was forced to shut at midnight instead of 3am. It could no longer make enough money to survive.

The story of the Arches resembles those of numerous clubs and party spaces around the UK. The number of nightclubs in Britain has almost halved since 2005 – down from 3,144 to 1,733, according to the Association of Licensed Multiple Retailers. Even in London, with the help of the city’s tourism, 24-hour transport and world-famous venues, the number of clubs has declined by a third.

The Arches was just one example of the extreme pressure being imposed by law-enforcement authorities and local councils. The police force has lost 17,000 officers since 2010 because of budget cuts and this has had a terrible effect, says Alan Miller, the chair of the Night Time Industries Association, formed last year to lobby for the sector. “The police fear that they’re running out of resources,” Miller says. “Venues are seen as a strain and blamed for poor behaviour, even off the premises. Some local councils are imposing more and more conditions on nightclubs: extra security, CCTV, metal detectors, sniffer dogs, breathalysers.” All of this creates new costs, which are passed on to customers.

Changes in the law have also damaged clubs. Alcohol prices have risen significantly in real terms since the 1980s, mainly as a result of government taxation. The ban on smoking, which came into effect in 2007, has had a knock-on effect. As club owners have become more vigilant, some partygoers have been put off. “If people want to score drugs nowadays, they know where to go,” says an insider. “And it sure as hell isn’t a nightclub.”

The law has changed nightlife in other ways. Being the only place to drink after 11pm was once a unique selling point of nightclubs, but since 2005 many pubs and bars have been allowed to extend their opening hours. Where once clubs had few rivals after midnight, punters today can stay in one place from early evening until the early hours.

Another problem is property prices, especially in London. Nightclub owners can often make more money by selling their premises to developers than by operating them as a club, Miller says. Party venues have always come and gone, thanks in part to gentrification and changing tastes, but high rents and strict licensing laws are making it far harder for entrepreneurs to break into the business. Those who manage to do so are expected to accept new costs; say, as more residents complain about noise, clubs have had to invest in expensive soundproofing.

No wonder disillusioned clubbers have increasingly taken to partying overseas, making use of low-cost airlines. “London used to be the king of clubbing. Now it’s Berlin,” Forrest says. When British clubbers go abroad, they find a more dynamic and varied scene where booze is often markedly cheaper. Across the 28 countries of the EU, only Ireland has higher alcohol and tobacco prices than the UK.

But clubbing has been affected by something more fundamental: the changing tastes of young people, who are better behaved than previous generations. The proportion of those aged 16-24 who are teetotal increased by more than 40 per cent between 2005 and 2013; a quarter of those under 25 don’t drink at all. The use of drugs and cigarettes has also declined.

The lingering effects of the recession and an increasingly competitive job market have made going out and getting wasted seem less appealing. At the same time, modern technology has created innovative forms of entertainment that won’t leave you with a hangover. The internet has made it easier to discover new music indoors and those who in the past would have gone out hoping to find romance can now use dating apps such as Tinder.

The history of nightlife in the UK is cyclical and it is entirely possible that the industry will renew itself. But, in order for this to happen, clubs will need to adapt to evolving tastes and will need greater support from local authorities that recognise and value their contribution to the economy, to communities and to culture as a whole.