Fish caught in waters flooded with millions of litres of sewage after a pump failure may be contaminated and should not be eaten, the Food Standards Agency warned today.

The sewage was discharged into the Firth of Forth after the breakdown at the Seafield waste water treatment plant in Edinburgh on Friday. The flow was finally halted this morning after temporary pumps were fitted through the night.

However, the Food Standards Agency Scotland (FSAS) called for a halt to fishing in the area.

"As a result of the incident, fish or shellfish caught in the Firth of Forth after the spill began on Friday afternoon may be contaminated and could pose a health risk to consumers," a statement said.

"People should not eat food caught in the affected area and food should not be harvested or fished in this vicinity. The FSAS is urgently gathering further data on the extent of this problem and will issue further advice as necessary."

However, Bertie Armstrong, chief executive of the Scottish Fishermen's Federation, said he felt the warning was "premature".

The treatment plant is owned and operated by Thames Water, under contract to Scottish Water. The company said the flow of sewage into Seafield could not be stopped without causing problems for Edinburgh and an emergency overflow procedure was therefore used to deal with the waste.

This involved discharging partially-treated waste water into the Forth, with solids removed to allow the water to dilute more effectively.

"We apologise to customers for this incident. The focus has been to get these repairs made and stop the flow of sewage as quickly as possible," the firm's customer operations manager, John Rae, said.

Edinburgh city council has advised residents to stay away from the area's shoreline. The failure of the pump meant that at one stage, 1,000 litres of raw sewage were pouring into the Forth every second.

The Scottish Environment Protection Agency (Sepa) is to begin investigations at Seafield today.

Scientists will take samples on the south Forth estuary, including Cramond, Portobello Central and West, Fisherrow West, Seton Sands and Longniddry. They will also take samples offshore and the results are expected tomorrow.

"Obviously, this is a major incident and we are treating it as such. There has been an exceptionally large volume of untreated sewage discharged into the Forth over the last few days," said Colin Bayes, director of environmental protection and improvement. "However, it is too early to make any comment on the likely extent or impact of the incident."

Scottish Water said the overflow procedure was in line with UK practice and that it would ask Thames Water, operator of the plant, to carry out a full inquiry.

In 2005, the consortium that runs Seafied sewage works was fined 5,000 for allowing sewage effluent to discharge from its East Calder plant into the river Almond on three occasions in 2001.