It was meant to be the tallest building in India, with luxury flats, a swimming pool and cinema where billionaires and Bollywood stars could enjoy a life of perfect splendour looking down over the Mumbai skyline.

But the Palais Royale complex now sits unfinished alongside other partially built structures tangled in the megacity’s traffic-choked downtown streets, an apt symbol of a crisis that threatens a key part of India’s financial system.

Over the past decade, some of India’s largest financial groups have bet big that the country’s fast-growing economy would breed a generation of rich bankers, lawyers and tech entrepreneurs eager to spend millions of dollars on luxury flats in the country’s largest cities.

A group of gutsy shadow banks willing to fund such projects were rewarded with roaring growth. These non-bank financial companies, like Palais Royale’s financier Indiabulls Housing Finance and other large groups like Dewan Housing Finance, soon became a big part of India’s financial system. Shadow banks grew to account for a fifth of all new credit last year, and became the largest source of funding for real estate thanks to loan growth of more than 20 per cent a year between 2013 and 2018.

But those bets on expensive property have now gone bad in an economic downturn, scaring off buyers and choking the flow of credit. That has left the real estate sector with a formidable mound of debt: developers collectively owe about Rs2.5tn ($37bn) to the non-bank financial sector.

“If the big players fail to get money,” said Sachchidanand Shukla, chief economist of the Mahindra Group conglomerate, “it can quickly have a domino effect. And that is the real scare.”

Property consultancy Anarock estimates that half of the luxury real estate in Mumbai’s downtown alone is unsold: 11,000 properties worth a total Rs590bn.

Analysts say these billions of dollars stuck in illiquid luxury property now present a serious threat to India’s economic health.

“It has a massive impact,” said Ramesh Nair, India head of property consultancy JLL. “If the real estate economy doesn’t pick up, the overall country will be in trouble.”

Non-bank finance companies provide loans for everything from roads to housebuilding and new washing machines and cars for consumers. But the sector faced a reckoning in September when infrastructure group IL&FS defaulted on debt, prompting a government intervention dubbed India’s “Lehman moment”.

This episode highlighted how many of these companies had borrowed short-term money cheap and made a profit lending to developers over longer terms. After the danger of this mismatch became apparent, investors rushed to recover their money, prompting the banks and mutual funds that had fuelled the non bank sector’s growth to pull back.

In Mumbai, the glut of expensive housing has only increased. Unsold inventory in the city rose 14 per cent in the first half of 2019 from the same time a year earlier, according to Knight Frank.

Indiabulls is now auctioning off Palais Royale to help recover Rs9.9bn from the developer. The property did not sell after an initial auction for a minimum price of about Rs8bn, prompting the company to lower its price closer to Rs7bn for a second auction in June.

The company said it was evaluating bids. But two people familiar with the matter said that Indiabulls had homed in on a buyer, and the sale was entering its final stages.

The vision for the project, started a decade ago, was spectacular. At more than 300 metres, Palais Royale was to be the tallest building in India with some 100 flats and amenities including a spa and cricket pitch, according to promotional videos and property websites.

“Everybody who is in industry, the captains of industry, booked an apartment there. All lawyers, bankers, industrialists — all of them have apartments there,” said Vishal Srivastava, Anarock’s head of corporate finance.

But progress was soon slowed by legal challenges over allegedly unauthorised features, sparking a series of delays. Indiabulls became involved in the project in 2011, refinancing a loan originally provided by a bank, but by 2016 — with the project still not finished and ongoing legal challenges — the company wrote off its investment as a non-performing asset.

However grand the planned building, Palais Royale’s woes fit a familiar pattern: 30 per cent of real estate projects and half of all built-up space in Mumbai is under litigation, according to a 2019 Brookings India report, with projects taking an average of eight and a half years to complete.

Investors remain uneasy. Indiabulls’ share price has fallen 50 per cent from a peak in August, while the stock of major non bank financial company Dewan lost almost 90 per cent of its value over a similar period. Lending from mutual funds and others to the shadow banking sector remains muted.

Debt levels at a group of real estate developers sampled by Credit Suisse, meanwhile, rose by 50 to 100 per cent in the past four years. “One risk is that, for real estate developers, the true magnitude of debt may be under-reported,” said Ashish Gupta, Credit Suisse’s head of India research. “Clearly the outlook isn’t great.”

Concerns that more defaults could spark contagion across Indian business have prompted repeated calls for the government to intervene and avoid a larger crisis. In early July, India’s finance minister Nirmala Sitharaman said the government would tighten regulation of non bank financial companies and create incentives for public-sector banks to boost lending to the sector.

Some life-long residents of Mumbai, meanwhile, lament the frenzy of construction that has gripped their city over the past decade, as apartment complexes mushroom in the city’s central neighbourhoods and push its already clogged roads and strained infrastructure to breaking point.

“They’ve built buildings which you can’t get to any more. The city is not able to keep up,” said one prominent billionaire industrialist. “It has just created this whole mess.”