Plans for ship-to-ship oil transfers in the Firth of Forth have been ruled out by the area's harbour authority.
Marine life could have been affected by the oil transfers in the Forth
Forth Ports has announced it is not proceeding with an application which was submitted by SPT Marine Services.
The transfer plans had sparked fierce opposition from local councils, residents and environmental groups.
The Scottish Government welcomed the decision on the proposals to pump about 7.8 million tonnes of crude oil a year between tankers in the firth.
Charles Hammond, group chief executive of Forth Ports, said: "In our role as the harbour authority for the Firth of Forth we have a statutory duty to assess all applications to undertake commercial activity on the river.
"We have used both internal expertise and independent expert advisors, taking into account all safety and environmental considerations and have undertaken one of the most extensive consultation exercises ever carried out in the UK.
"Given the uncertainty surrounding the scope of the proposed project, we have decided that this application is not in the best interests of the company and its shareholders."
Environment Secretary Richard Lochhead said: "The Scottish Government joins the communities of the Firth of Forth in warmly welcoming this decision by Forth Ports.
"The decision against this specific proposal for ship-to-ship transfers of oil in the Firth of Forth will be welcomed by all those who have campaigned against the proposal."
He added: "This is the right decision for Scotland and the right decision for Forth Ports. I am pleased that they made this balanced judgement.
"I am grateful to Forth Ports for their constructive engagement with the Scottish Government and with the Scottish Parliament on this issue."
Lloyd Austin, RSPB Scotland's head of conservation policy, said specific legislation was needed to allow comprehensive planning of all activities in the marine environment.
He said: "This is a good decision for wildlife, and for communities around the Forth.
"Common sense has finally prevailed in this case, and we look forward to examining Forth Ports' assessment in detail.
"The UK Government last week announced that it would regulate ship-to-ship transfers in all UK waters later this year, and we hope that these will be sufficiently robust to give proper protection in cases such as this."