The government has given the go-ahead for the UK's first desalination plant to be built in east London.
The planned £200m facility in Beckton will make supplies from the Thames estuary drinkable.
London Mayor Ken Livingstone, who opposed the plan, described the move as "misguided and a retrograde step in UK environmental policy".
But welcoming the success Thames Water said the plant would be run entirely on energy from renewable sources.
It could supply 140 million litres of water a day, enough to supply 400,000 homes in north-east London.
Thames Water said to reduce the plant's carbon footprint bio-diesel, a liquid fuel made from plants, would be used to power the facility.
Its sustainability director, Richard Aylard, said: "The desalination plant is an essential part of our proposals to safeguard future water supplies for London and without it we face an unnecessarily high risk of severe water shortages."
However, Mr Livingstone said he is consulting his legal team to see whether there are grounds to challenge the government's position.
"I refused Thames Water's application to build this plant on London's green belt because Thames Water should be fixing more leaks before they find expensive ways to spend Londoners' money on making fresh water," he said.
"Building a desalination plant sends the wrong signal. We should be encouraging people to use less water, not more."
The initial plan was approved by Newham Borough in March 2005 but the mayor directed the borough to overturn the approval.
Subsequently Thames Water filed an appeal against the decision in July 2005, which led to a public inquiry in May last year.
The firm now needs to secure planning permission before work can start at the site.