The public has been warned to avoid contact with water in the Firth of Forth after a "major" spill of more than 100 million litres of sewage.
People using the waterfront are urged to take precautions
Pumping equipment at the Seafield Wastewater Treatment Plant in Leith failed at 1630 BST on Friday.
Thames Water, who run the plant, said 1,000 litres a second of partially diluted untreated sewage had been pumping into the Forth.
The Scottish Environment Protection Agency said a major solution is needed.
A Sepa spokesman said emergency measures to "minimize the risk of pollution" were being put in place.
He added: "Everything that needs to be done is being done."
Engineering works were expected to continue throughout the weekend.
Thames Water said it had not shut the plant down as it deals with most of the capital's waste - from about 800,000 people.
Spokeswoman Hillary Bennet said: "Sewage is still pumping into the Firth of Forth. We're installing temporary pumping equipment which we expect will prevent further discharges from the pumping station."
Environmental health officers with Edinburgh City Council advised anyone who uses waterfront recreational areas to avoid contact with the water.
The council said it was very concerned about the incident.
Council leader Ewan Aitken said: "We urge people to ensure they maintain high standards of personal hygiene and do not take anything home from the beach until sewage has dispersed."
The council has put up warning notices along the shore in areas which may potentially be affected to warn residents and visitors.
Concerned locals are being advised to contact the environmental health service.
Residents in Leith have been campaigning for years about the smell from the plant and say it is not fit for purpose.
Rob Kirkwood, the chairman of Leith Links Residents' Association, said: "It has an infrastructure that is basically Third World technology."
Are you in the Firth of Forth and have you been affected by the spill? Have you been on the waterfront and can you see the effects of the leak?
We went for a walk along Crammond on Saturday afternoon, when we got there we could smell the problem. There were no notices indeed it was only as we returned from our walk we were stopped by someone and informed of the incident verbally.
Duncan Wallace, Edinburgh
Next it will be a major spill from the proposed oil transfer on the Forth. Mix this in with all the other industrial chemicals and waste and the Forth can be declared dead. The bottom line is that our government and the industry treat the Forth like a giant cesspool and see it as an asset for profit and not for its critical importance as part of the local ecosystem or for its beauty.
Tony, Culross, Fife
There were no warnings that I saw posted anywhere near Portobello Beach (just a mile or so down river) this morning when i was there briefly with my 2 children. Frankly this is just another one in a series of problems we have had with this plant - there have been constant complaints and even demonstrations regarding the smell from this plant. Thames water have promised to solve the problem but its been going on for years.
Rodger Moffet, Leith, Edinburgh, Scotland
I live beside the Firth of Forth and work beside Seafield sewage plant. The plant is a disgrace & has been the subject of many complaints for years. The surrounding area stinks, blamed as usual on old equipment. The council has repeatedly ignored calls for the plant to be updated and this major spillage comes as no suprise to many locals who have known for some time that it is substandard & should have been closed years ago.
Simon Arbuthnot, Edinburgh, Scotland
I was surfing at Pease Bay on Friday unaware until Sunday morning that this has happened. I want to know if we have been contaminated. This is disgusting and not good for the environment.
Grant Finlayson, Edinburgh
Here in west Fife there are signs of this filth being washed up already. Walking the dog this morning (before I heard the news), I remarked to my wife how filthy the beach looked. There are examples of human waste in several places. We are having reasonably high tides at the moment (the new moon has just passed) and I hope that this afternoon's high tide will clean up the landscape. My fear is that, as we're moving towards a week of lower tides, some of this filth gets left on our waterfront. I hope that Hilary Bennet and Edinburgh City Council remember that we're being affected by this here in Fife and do something about it.
Eric Blair, Rosyth
We live on the shore of the Firth of Forth in Portobello and along the prom the notices that have been put up are very few and far between and pathetic - considering this is quite a serious problem. There should surely be some major signs up, not just some A4 pieces of paper tied with string ???
Steve Lavender, Portobello, Edinburgh