Barneys bought itself more time — but its future is murkier than ever.

The luxury department store filed for Chapter 11 bankruptcy protection early Tuesday morning, securing a $75 million loan that will help it close 15 stores. It will keep its Madison Avenue flagship humming along with six other stores — even as its hefty rent at the flagship location has become a financial albatross.

The Madison Avenue store, long the crown jewel of the century-old retailer, is the primary reason Barneys had to file for bankruptcy. Rent there doubled this year to $30 million — $44 million, including taxes — setting into motion the Chapter 11 filing.

Before the rent increase, the store had been profitable — generating about $25 million in profits, according to multiple sources.

Barneys — owned by hedge fund billionaire Richard Perry, whose wife, Lisa Perry, designs clothing prominently featured in the stores — said it plans on securing a buyer in the next few months.

But as The Post reported last month, management has been flying around the globe courting potential investors for months to no avail.

Among those who kicked the tires and passed: Macy’s, Nordstrom, Neiman Marcus and Saks Fifth Avenue owner Hudson’s Bay, according to sources.

Also troubling industry watchers is that Barneys’ $75 million loan was provided by Gordon Brothers Group and Hilco Global, both bankruptcy and liquidation specialists. Its lead lender, Wells Fargo, decided not to extend more credit, sources told The Post.

“Legacy stores are closing and Barneys is trying to buck a trend, but they don’t have the financial resources to withstand the hurricane,” said Richard Kestenbaum, a partner at Triangle Capital. “Barneys requires capital, and I’m not aware of anyone who wants to put that into Barneys.”

“Like many in our industry, Barneys New York’s financial position has been dramatically impacted by the challenging retail environment and rent structures that are excessively high relative to market demand,” Barneys Chief Executive Daniella Vitale said in a statement.

In the meantime, Barneys will have to regain the trust of its posh vendors, including Yves Saint Laurent, which is owed $2.2 million, Balenciaga $2.1 million, Givenchy $1.2 million, and Prada which is owed $1.6 million, according to court documents.