Nauru is banking on fields of mineral-rich smooth brown rocks about the size of a potato that lie on the sea floor around the tiny island as the possible saviour of its fragile economy.

For the island nation of just 10,000 people, financial viability has been a pressing problem since the exhaustion of its rich phosphate deposits in the 1970s.

The nodules that lie 4km below the sea might be the answer. They are rich in the metals that are essential for the clean-energy industry: nickel, cobalt and manganese.

The deep-sea mining venture needed to tap the resource is being led by a Canadian company, DeepGreen, which is run by an Australian entrepreneur, Gerard Barron, and backed by mining giant Glencore and shipping company Maersck. It is in the exploration phase but results are promising and it hopes to begin mining in 2025.

For Nauru it will be just in time.

At the moment Nauru’s main industry could perhaps be described as misery and suffering, courtesy of Australia’s offshore detention policies. Since 2013, when the offshore detention and processing centre reopened, Australia has been providing about two-thirds of Nauru’s GDP of $170m by way of direct aid, visa fees and payments to the government for hosting the refugees.

But with hundreds of refugees sent to Nauru being resettled in the US and others moved to Australia, that industry is winding down, posing a new economic challenge for the troubled island nation.

The story of tiny Nauru, once one of the wealthiest states per capita in the world, is a tale of rapacious colonialism, epic mismanagement, and avarice.

Australia, New Zealand and Britain had nearly exhausted the viable deposits of phosphate by 1968 when Australia granted Nauru sovereignty, leaving behind one of the world’s worst environmental disasters.

It might look like a Pacific island paradise but, thanks to phosphate mining, its interior is a moonscape of jagged limestone pinnacles unfit for agriculture or even building.

A phosphate mining site on Nauru, now exhausted, leaving a barren terrain of limestone pinnacles. Photograph: Auscape/UIG via Getty Images

There was talk in 1963 and again in 1970 of moving the 10,000 inhabitants to an island off Queensland, which the Nauruans opposed. Instead, the islanders have soldiered on as one of the smallest and most geographically isolated nations.

The royalties from phosphate accumulated in a trust by the Nauruans – worth A$1.7bn at its peak – were squandered in the years following independence.

By 2002, Nauru had stopped paying its loans, which had blown out thanks to the devaluation of the Australian dollar against the US dollar. GE Capital, which was owed US$239m on mortgaged properties, sent in the receivers.

The assets, which included the 50-storey Nauru House in Collins Street, Melbourne, the Downtowner Motel in Carlton and the Mercure Hotel in Sydney, are long gone.

A series of corrupt and incompetent governments found extravagant and spectacular ways to lose the country’s wealth, including, notoriously, funding a disastrous West End musical based on the life of Leonardo da Vinci.

Nauru spent years in desperate penury as the country ran out of money. Its central bank went broke, its real estate overseas was repossessed, its planes seized from airport runways.

As the financial crisis engulfed the island, it turned to exploiting its sovereignty. During the 1990s it transformed into a money-laundering haven selling banking licences and passports, including diplomatic passports, which confer immunity. Customers included the Russian mafia and al-Qaida.

An estimated $70bn in Russian mafia money went through Nauru’s banks in 1998 alone.

In 2002, the US treasury designated Nauru as a money-laundering state, alongside Ukraine, and imposed tough sanctions rivalling those slapped on Iraq.

“Nauru is notorious for permitting the establishment of offshore banks with no physical presence in Nauru or in any other country,” the US treasury said. “These banks maintain no banking records that Nauru or any other jurisdiction can review. The evidence indicates that the entities that obtain these offshore banking licenses are subject to cursory and wholly inadequate review by the country’s officials and lack any credible ongoing supervision.”

The Financial Action Task Force (FATF), a global body that works to eliminate tax havens, has been working with Nauru to walk back from its foray into the wild west of finance.

By 2004 Nauru had passed anti-money laundering and terrorist financing laws and the offshore banking sector seems to have disappeared as fast as it arrived.

As of 2012, when the FATF reviewed Nauru, there were only 59 corporations registered under Nauru law, with a number of those pending for being struck off the registry. Fewer than five corporations per year have been registered over the past five years. In the past 10 years no new trust company licences have been issued, although 15 unit trusts have been formed under the 11 existing unit trust licences.

In 2017 a Senate committee was told Australia’s offshore immigration detention on Nauru and Manus had cost at least $5bn since 2012. Photograph: Jeremy Ng/EPA

However, it remains a secretive destination and learning anything about Nauru’s corporate sector remains difficult. There is no corporations registry online, and websites advertising tax havens still list Nauru as an option.

In 2016, Westpac pulled out of providing banking on Nauru, citing concerns about compliance with international money-laundering regulations in a letter to customers. The only bank on the island is the Bendigo Bank, which opened in 2015.

A few weeks ago the finance minister, David Adeang, announced that Nauru was fully compliant with the European Commission’s tax and financial security regulations, and had been removed from its grey list, although the EU has not yet published a formal statement.

“Since the election of the Waqa government in 2013 we have worked very hard to lift Nauru’s international reputation, which was damaged over so many years by many former administrations due to greed and corruption,” Adeang said at an EU international tax seminar in Fiji last month.

Nauru’s economy has also improved since 2013, thanks to one industry: refugee detention and processing for Australia.

The first Nauru offshore detention experiment began in 2001, after the Tampa crisis. This was the catalyst for Australia to set up the camps in Nauru and Papua New Guinea.

It ran until 2007. The camp was bedevilled by problems: overcrowded tents and a shortage of water were the most pressing. Slowly it was established that, overwhelmingly, those who had come by boat were not “queue jumpers” or criminals or terrorists but rather people fleeing genuine persecution and who were owed protection. Most were resettled, and mostly in Australia.

Nauru’s second iteration as an isle of detention, instituted by a Labor government and carried on with unswerving determination by the current Liberal-National Coalition government, began in 2012.

The problems are undiminished. But the second Nauru detention regime, now formally replaced with a resettlement program on the island, has been kept carefully hidden. Foreign journalists – save for a handful of selected reporters – are forbidden entry to the island.

The financial cost has been enormous. In 2017 a Senate committee was told Australia’s offshore immigration detention program – Nauru and Manus – had cost the federal government at least $5bn since 2012.

Only part of that flowed to the economies of Nauru and PNG, as many of the functions needed to keep the reprocessing centres running – maintenance, garrisoning, legal assistance, welfare and health services – are provided by fly-in-fly-out Australian firms.

But there are benefits. The Nauru government is paid resettlement fees, reimbursements towards the cost of its public services, jobs for locals and increased economic activity.

Nauru’s president, Baron Waqa, is hopeful the DeepGreen venture will bring great benefits. Photograph: Ness Kerton/AFP/Getty Images

That now raises the difficult question of what happens when Australia leaves.

The dependence of Nauru on Australia and its offshore detention policies is revealed in Nauru’s own budget papers for 2018-19. Australia is responsible for directly providing at least two-thirds of Nauru’s revenue, which last year was $167m. It reported a balanced budget in 2017-18, spending all but a tiny sliver.

Australian aid makes up a big share: $26m in 2018-19 , even as Australia has sought to prune its aid spending overall. This is despite the Department of Foreign Affairs’ own assessments for 2016-17 that the core programs in education and health are failing to meet benchmarks. The assessment on health slipped from amber to red.

But there are also big licks of money coming from visa resettlement fees ($21m), reimbursements to Nauru’s department of justice and border control ($8.2m), and fees to the Nauru Regional Processing Centre corporation ($14m), which provides local staff.

Australians coming and going from the island have breathed new life into Nauru Airlines, the only way to reach the island, while port charges are up and a major upgrade of the port, funded by the Asian Development Bank and Australia, is under way.

Government spending has tracked up at the same pace as revenue, leaving the island vulnerable to a sudden change in circumstance.

The Nauru government knows that the boom is coming to an end.

“Uncertainty remains regarding the numbers of refugees remaining on the island and the operation of the regional processing centre,” the budget papers say. It is forecasting a 3% contraction this financial year.

In the short term, Nauru might get a bigger slice of the pie as Australian companies leave and hand over to the Nauru Regional Processing Centre Corporation in October.

But after that the future is precarious.

Most of the utilities, mining and even the shops and supermarket are controlled by Nauruan state government companies that did not file financial statements in time for the budget papers, so it’s hard to say what shape they are in.

Eigigu, which runs the supermarkets, hotels and shops, is in dispute over its hotel in the Marshall Islands, which is closed.

Mining of remnant phosphate deposits has slowed to a dribble. Nauru Rehabilitation Corporation (NRC), which took over mining operations in the last few years, is handing it back to Ronphos, the government-owned phosphate company, from July 1.

In 2018-19 it is budgeting on making just $22m from phosphate but will spend $27.5m mining it, the budget papers say. The deficit is being funded by a loan from the Taiwanese government and only a quarter of the new equipment needed has been purchased.

With little phosphate left, this appears to amount to shuffling of the deckchairs on the Titanic.

As for rehabilitation of the island, the progress has been glacial.

The NRC was set up after a financial settlement in 1993 by Australia of $135m in belated recognition of the environmental disaster it had wreaked on the island.

NRC originally had a target of rehabilitating 400 hectares at the rate of 20 ha a year, but so far it has only rehabilitated a small area known as pit 6, which is being used as the site of the jail.

The $135m appears to be gone. The budget papers say NRC’s balance sheet shows “a deficit in net worth” and that “future (donor and or Nauru government) external funding will be required for the NRC future work.”

Meanwhile, Nauru is running out of land.

The other big earner in recent years has been fishing. The government earned $43.14m last financial year in fees paid by foreign-flagged vessels to undertake what is called “purse seine fishing”. This involves putting out several kilometres of net in a circle, which is then closed from the bottom with a drawstring, trapping tuna and other species.

The Nauru government has recently invested in two Korean-flagged tuna boats in an effort to secure a bigger cut of the fishing industry.

The DeepGreen undersea mining project will need to be balanced with protecting these marine resources.

DeepGreen has undertaken three exploration voyages and plans four more. It says the resource has proved very promising, with high concentrations of the mineral-rich nodules on the seafloor at a depth of 4km. It plans to begin commercial mining in 2025.

Nauru’s president, Baron Waqa, is hopeful the venture will bring great benefits.

“My government continues to look for other revenue sources for Nauru. Not just now, for the future. This venture with DeepGreen will ensure that our revenue will be well diversified for our children and their children well into the future,” Waqa said after the company reported that it had found significant resources in the territory around Nauru.

DeepGreen’s Gerard Barron said under the agreement with Nauru, the company will pay royalties of “tens of millions” a year and make a significant contribution to the island’s GDP.

The company is already offering training and job opportunities to Naruans on its exploration voyages. Barron believes undersea mining for minerals could be as transformative for the Pacific as oil was for the Middle East.

“They’re the metals we need to build electric vehicle batteries, to build renewable energy storage, to build electricity-generating windmills and solar panels. At DeepGreen we call them metals for our future,” he said.

But undersea mining is controversial. The Solwarra project, being undertaken by Nautilus Minerals off the coast of PNG, involves excavating and crushing up volcanic vents on the seafloor and then pumping the rubble to the surface. It’s been opposed by local communities and environmental groups.

Barron says mining nodules has far less impact: the loose nodules are vacuumed up and pumped to the surface, with the residual water then pumped back down to avoid disturbing ocean temperatures.

In anticipation of the end of the detention centre business, Australia, Taiwan, New Zealand and the Asian Development Bank have also begun paying into the Nauru Intergenerational Trust Fund, a sovereign wealth fund being managed by a board of donor representatives and Australian accounting firms.

Its proceeds, currently $56m, cannot be spent until it builds to a critical mass. Nauru will make contributions, depending on its income each year.