Image copyright Matthew Teller

The fertile Wadi Hanifah valley running through part of Riyadh was for years a rubbish dump and a public health hazard, but now it's been transformed into a vast park, with lakes that attract cool breezes. It's an oasis so large it's hard to police - making it a place for Saudi citizens to relax, in more senses than one.

Down by the lake, Hussein Al-Doseri is beaming.

"Before all this, there were no services here, no trails, no routes."

An athletic 30-something in sunglasses and white T-shirt, Al-Doseri stretches his arms wide to show me the landscape of trees and open water that forms Wadi Hanifah, a shimmering lake in the unlikely setting of an industrial suburb of south Riyadh.

For years treated as a dumping-ground and open sewer, the Hanifah valley has been the focus for an award-winning 10-year restoration project. It has plenty of fans in the hot, dry Saudi capital.

"Now I come here all the time," says Hussein Al-Doseri. "It feels like the opposite of Riyadh."

Rising in the highlands of central Arabia, Wadi Hanifah runs southeast for 120km (75 miles) before losing itself in the sands of the Empty Quarter desert.

This great watercourse is dry for most of the year, but fertile thanks to aquifers close to the surface. People have been farming and trading up and down the valley for millennia.

As a village, then a small town, Riyadh grew sustainably with its population. But from the 1970s rapid growth quickly overwhelmed the city's ecosystems.

Construction firms mined Wadi Hanifah for minerals. The valley was blocked by encroaching farmland. Seasonal flooding swept pollutants into residential neighbourhoods and then left stagnant water, jeopardising public health.

Yet today, Wadi Hanifah shows few signs of its polluted past.

At Al Elb, on Riyadh's scorched northern outskirts, I walked along Wadi Hanifah beside high desert bluffs.

Image copyright Matthew Teller Image caption Improvements to Wadi Hanifah have given children a new place to play

Palm trees now shade a line of carefully designed picnic pods, each comprising a horseshoe of roughly finished limestone slabs, offering secluded valley views.

More slabs, laid horizontally, create steps down to the valley floor, where children scamper along nature trails and families lounge under the acacias.

"Riyadh has no open space," says engineer Saud Al Ajmi. "Wadi Hanifah has become a place to breathe."

Since 2001 the ArRiyadh Development Authority has been restoring and redeveloping the valley, clearing rubbish, grading the banks, landscaping and replanting native flora.

In other big cities you might head up to high ground for a breath of air. In Riyadh, you head down.

Wadi Hanifah acts like a flue, drawing cool breezes over the city to disperse smog and temper the heat.

It is a very long, very thin oasis.

Negotiating Riyadh's ceaseless traffic brought me to the project's defining idea. Overlooked by crisscrossing flyovers, a new facility is transforming urban run-off into water clean enough for irrigation and fishing.

It uses bioremediation - applying natural processes to repair environmental damage.

Canadian landscape architects, working with British engineers, have created a linked series of wetland habitats.

Within three large ponds, algae form the basis of a food web that includes fish, insects and molluscs.

Aided by natural oxygenation, it effectively removes harmful bacteria and other pollutants from the water flowing through.

It is a startling process to observe, where dirty water enters and clean water departs, without human intervention in between. It has also never before been attempted on this scale.

Image copyright Matthew Teller

Indeed, now that bioremediation has been proved to work in Riyadh, scientists are studying how to transfer the technology to other cities.

The Wadi Hanifah scheme has benefited the environment and the economy, and brought gentrification to previously unfashionable neighbourhoods alongside the valley - but it has also reconnected the Saudi capital with a key aspect of its self-identity.

Wadi Hanifah is where Riyadh was born, yet for years it was a source of shame. The clean-up has restored pride.

There is an element of what some call "greenwash" to all this. Almost $1.5bn (£1bn) has been sunk into a headline-making scheme for a city where, I was told, up to a third of households remain unconnected to mainline sewerage.

And, of course, there was no public consultation. As one adviser delicately put it, Riyadh is "able to provide a green light for schemes that might take a lot longer in other countries".

And the creation of a green corridor of parkland and lakeside promenades through the middle of the Saudi capital is also having unexpected social consequences.

The authorities are realising that they simply cannot police such a large area.

By tradition Riyadh has no public entertainment - no cinemas, theatres or music - so the only leisure venues are shopping malls and parks.

Picnicking is big in Saudi Arabia. And down in the cool, shaded Hanifah valley, beside flowing water, there are signs of unusual change.

Saudis and foreigners are starting to mix, in a way unthinkable before. Women are even unveiling with impunity.

Environmental conservation in Saudi Arabia has the potential, it seems, to offer benefits not just to birds and animals.

How to listen to From Our Own Correspondent:

BBC Radio 4: A 30-minute programme on Saturdays, 11:30 BST.

Second 30-minute programme on Thursdays, 11:00 BST (some weeks only).

Listen online or download the podcast

BBC World Service:

Hear daily 10-minute editions Monday to Friday, repeated through the day, also available to listen online.

Read more or explore the archive at the programme website.