Imagine having to wait in a queue to collect a 25-litre daily ration of water because your city's taps have run dry.

That is a doomsday scenario only narrowly avoided by South Africa's drought-stricken Cape Town, which was facing the prospect of becoming the world's first major city to run out of water.

According to experts, it is a catastrophe that could have also played out in Perth — a city similarly in the throes of a drying climate.

But as Cape Town officials race against time to secure the city's water supply through systems that do not rely on rainfall, such as desalination, Perth has reached a major milestone.

Its two desalination plants in Kwinana and Binningup — which turn seawater into drinking water — recently ticked over the one-trillion-litre mark.

The Kwinana seawater desalination plant in Perth's south began operating in 2006. ( Supplied: Water Corporation )

That is enough water to fill the Perth Stadium 1,000 times, and equates to more than three years worth of supply for Perth, the Goldfields and the Wheatbelt.

"We face very similar climatic conditions to Cape Town. The difference between Cape Town and Perth is that we've been in a position to make long-term decisions to deal with climate change," WA Water Minister Dave Kelly said.

"We could have been in a similar situation had we not made decisions a decade ago to invest in climate independent sources of water."

How Perth dodged Day Zero

Earlier this year, Cape Town authorities declared Day Zero was looming — the date when dams levels would get so low, the city's taps would be turned off and residents would have to line up at checkpoints to collect their 25-litre daily ration of water.

The situation was so dire that on the descent into Cape Town, pilots implored tourists to be water wise, and "If it's brown flush it down. If it's yellow, let it mellow" signs were plastered in bathrooms across the city.

Signs at Cape Town International Airport urge people to think twice about flushing the toilet. ( Supplied: Lisa Scriven )

Strict water restrictions amounting to 50 litres per person per day — Perth residents use an average of 335 litres a day — and a concerted effort by Capetonians to save water has, for now, averted Day Zero.

Perth, much like Cape Town, was once almost entirely reliant on its dams.

But the city's rainfall has declined almost 20 per cent since the 1970s, and the amount of water flowing into the city's dams has fallen from an average of 300 billion litres a year to just 25 billion litres.

As a result, in the past decade the Water Corporation has had to get creative with water-producing methods that are independent of the climate, such as desalination and groundwater replenishment — a scheme in which treated wastewater is injected into underground supplies to be re-used as drinking water.

UWA's professor of environmental engineering, Anas Ghadouani, said these measures had been "critical" in ensuring Perth did not suffer the same fate as Cape Town.

"I think we could have been in that same situation … any one city or country that puts all its eggs in the same basket is vulnerable to water shortage," he said.

City's supplies still at risk

Desalination provides almost half of Perth's water needs while the other half comes from ground water, but Mr Kelly warned the city was still not out of the woods.

"The only downside of these two desalination plants is that there is in the community, to some degree, a belief that … the job is now done, Perth's water supply is now secure. That's not the case," the Minister said.

Water Minister Dave Kelly remains neutral on whether Perth needs another desalination plant. ( ABC News: Irena Ceranic )

"Our climate continues to dry, our dams are virtually redundant."

Mr Kelly said Perth would eventually need a new major water source, but he remained neutral on whether that could be another desalination plant at a cost of $1 billion-plus or further recycling.

"That depends on when that new source is required and what the economics are at that time, and what the environmental impacts are," he said.

Professor Ghadouani said a third desalination plant was not the answer, and argued recycling should be bolstered.

"There's a large amount of [wastewater] that goes to the ocean … we should not allow the water to go into the ocean," he said.

"We should allow it to either go into recharge or treatment to produce good water for public open space, even potable water. It's possible.

"The technology is there to treat any water — waste-water, storm water, any kind of water can be treated to perfection."