The owners of Fabric nightclub have reached a settlement with Islington Council to reopen.

The new licensing deal includes pledges to boost security and introduce stricter anti-drug rules.

Under-19s will be banned from entering and anyone found with drugs, or who tries to deal drugs, will be banned for life.

The venue was shut in September after the council revoked its licence following the deaths of two clubbers.

It said Fabric had a "culture of drug use" which staff were "incapable of controlling".

Islington Council has released a joint statement with Fabric about the settlement and says the club won't reopen until all of the new conditions are met.

The agreement, which was approved by a judge at Highbury Corner Magistrates' Court, includes the following provisions...

• The use of a new ID scanning system on entry to the club.

• Enhanced searching procedures and controls.

• Covert surveillance within the club.

• Life-time bans for anyone found in possession of drugs, whether on entry or within the club.

• Life-time bans for anyone trying to buy drugs in the club.

• Enhanced monitoring and external auditing for compliance against procedures.

• Physical changes to the club, including improved lighting and additional CCTV provision.

• A new security company.

• Persons under 19 years of age shall not be permitted to be on the premises as a customer or guest from 8pm on a Friday until 8am on the following Monday or on any day during the hours that the operators promote a Core Club Night.

The Islington Council/Fabric statement says: "Fabric accepts that its procedures in relation to searching were insufficient, as were its procedures to prevent the consumption and dealing of drugs within the club itself.

"Fabric accepts that the police acted reasonably in making the application for a review and that the authority's sub-committee was fully entitled to revoke its licence."

Radio 1 and 1Xtra's MistaJam has told Newsbeat: "When no one else was booking grime in the whole of the country, it was being booked at Fabric.

"I am just really looking forward to hearing what the next wave of music is going to be championed there. This is a very good day for music."

London mayor Sadiq Khan has welcomed the news on Twitter.

The club was planning to appeal against its closure order at Highbury Corner Magistrates' Court court next week.

But that date has been avoided after successful talks between the owners and Islington Council.

More than 150,000 people signed a petition and a fund of more than £300,000 had been raised to help with the club's legal costs.

Fabric has tweeted to thank its supporters.

The closure of the club in September caused outrage among clubbers and DJs including Radio 1's Annie Mac and Pete Tong - who called for the order to be overturned.

The venue also released an 11 CD boxset featuring artists including Roman Flügel and DBridge to support its fight.

It's thought money left over after any legal case could be used to try to change London's licensing laws.

Superintendent Nick Davies, from Islington police, said the club felt the force had "acted reasonably in the circumstances".

He welcomed Fabric's offer to place additional conditions on its licence and a zero tolerance approach to drugs, and said police would continue to "robustly enforce the licensing objectives".

"We will be monitoring the ongoing conduct of Fabric and the activities that take place within it.

"If there are further breaches of the licence, Fabric should be in no doubt that they will be challenged by Islington police and action taken," he said.

"I know Fabric is a venue that holds a great deal of affection in people's hearts.

"We had no choice but to take action to safeguard clubbers - and now Fabric has agreed to considerable changes, I hope the venue can continue to operate for many years to come within the boundaries of the new licensing conditions."

Last week an inquest into the death of 18-year-old Ryan Browne in June heard that he bought drugs inside Fabric on the night he died.

The coroner's court heard that Ryan and his friends had bought MDMA from a dealer near their sixth-form college in Luton.

They took them into Fabric, hidden in their socks, which weren't searched.

Inside Ryan's friends saw him buying more drugs from a man near the DJ booth.

Later they got a bouncer to take him to the medical area but the teenager from St Albans died in hospital the next day.

Jack Crossley, 18, from Worcester Park in southwest London, collapsed outside Fabric on 6 August.

An inquest into his death will take place on 4 January at Poplar Coroner's Court in east London.

Meanwhile, Sebastian Clark-Darby has been jailed at London's Blackfriars Crown Court for sending a death threat to a councillor involved in the decision to shut Fabric down.

The 25-year-old was given eight months in prison for sending a malicious message to Flora Williamson, chair of Islington Council's licensing committee.

Find us on Instagram at BBCNewsbeat and follow us on Snapchat, search for bbc_newsbeat