Barneys New York was thrown a lifeline in bankruptcy court on Thursday, as lenders extended the luxury retailer’s deadline to find a buyer to Oct. 11.

The swanky chain was facing an ultimatum by its lenders to secure a buyer by Thursday or face liquidation.

The extension by its lenders — Brigade Capital Management and B. Riley Financial — gives Barneys more time to secure a deal with a fashion trade show executive, Sam Ben-Avraham, who has emerged as the lead bidder to acquire Barneys as a retailer, sources said.

Sources close to Barneys say the retailer also is hopeful about reaching an agreement with its landlord — Ashkenazy Acquisition — in New York at its Madison Avenue flagship and in Beverly Hills.

Barneys’ rent doubled this year to $30 million, pushing it toward bankruptcy amid a slowdown in luxury spending and in bricks-and-mortar stores.

Ben-Avraham runs high-end fashion trade shows called Liberty Fairs and Cabana in New York, Las Vegas and Miami. He was also an early investor in the brand KITH, which has three retail locations and was spearheaded by designer Ronnie Fieg.

Another bidder, licensing firm Authentic Brands Group, is waiting in the wings to swoop in and buy Barneys’ intellectual property if it liquidates, sources say.