India’s temples aren’t just places of worship. They are also huge repositories of wealth, with coffers often stuffed with astounding amounts of gold and cash.

The Narendra Modi government – soon after coming to power – realised that the wealth, if used well, could bring down India’s trade imbalance. So, earlier this year, it thought of asking temples to start investing their gold in deposits.

While the gods haven’t parted with their gold yet, India’s richest temple – in terms of donations received and income – has finally decided to try out its mettle in the country’s booming stock market.

On August 3, the Tirumala Tirupati Devasthanams, the organisation which oversees the famous Tirupati Balaji temple in Andhra Pradesh, said it had opened a dematerialised – or demat – account. A demat account allows investors to hold stocks and securities electronically, instead of physically possessing them.

The temple, as a result, will now accept donations in the form of equity shares from devotees. This will make it a shareholder in India’s equity markets.

“TTD has been receiving physical share certificates as donations by devotees in its open hundi (donation box), which indicates that devotees are interested in donating shares. TTD viewed that enabling devotees to use the demat account for donations helps both,” PS Reddy, managing director and CEO of Central Depositories Service, a Mumbai-based depository of securities, told The Economic Times newspaper.

The Tirupati temple – which millions of Indians visit annually, often shaving their hair as an offering to the deity – already has massive investments in real estate. In August last year, the Andhra Pradesh endowments minister, Manikyal Rao, said that the market value of land owned by TTD was around Rs 9,800 crore.

The organisation owns land and shopping complexes in Andhra Pradesh, Delhi, Kerala, Karnataka, Tamil Nadu, Gujarat, Maharashtra, Pondicherry, Haryana, Odisha, and even Nepal.

Devotees in India are known to offer huge donations that include chunks of gold and wads of cash. In most of the cases, an overarching trust is in charge of the wealth, which is used maintain the temples and build infrastructure for the devotees.

Some of these temple trusts – including TTD – have been depositing gold with banks. Others, like the Siddhivinayak temple in Mumbai, often auction gold articles and ornaments. But even with these various ways of utilising the gold reserves, the majority of the wealth is still left unused.

In the past, some of the other temple trusts, too, have dabbled in the stock markets, but they stuck to investments in mutual funds. Mumbai’s Shree Siddhivinayak Temple, the Jagganath Temple in Puri, Odisha, and the Vaishnodevi Temple trust in Jammu and Kashmir have all invested in mutual fund schemes.

During the last year, India’s equity markets have touched historic highs, driven by positive sentiment among investors about the economy’s revival. The country’s benchmark Sensex index is up 10% in the last year (since Aug. 5, 2014). And analysts are hopeful the index will continue to rise. Some divine intervention is unlikely to hurt.

This article was originally published on Qz.com.