DFDS Seaways, the Scottish government and Forth Ports have agreed to continue the freight ferry service between Rosyth and Zeebrugge.
The three bodies signed a memorandum of understanding (MoU) to continue direct freight ferry services from Scotland to continental Europe.
In August, doubts were raised about the service's future due to European environmental legislation.
Capacity on the route will be increased following customer requests.
MoUs are formalised decisions between two or more parties. The organisations agreed to continue the service under the management of DFDS Seaways.
Previous concerns over the route were prompted by the EU Sulphur Directive, which will force shipping operators to switch from high-sulphur marine fuel oil to more expensive marine gas oil.
North Sea and English Channel operators are allowed to fit exhaust scrubber systems as an alternative, although these are expensive and not suitable for all existing vessels.
In September, DFDS ended its Portsmouth to Le Havre and Harwich to Esbjerg ferry routes.
The existing schedule will be maintained, with the Finlandia Seaways vessel offering three departures in each direction every week.
DFDS Seaways and Forth Ports have also announced that infrastructure improvements at Rosyth terminal mean that containers can be double-stacked, therefore increasing freight capacity.
Niels Smedegaard, CEO of DFDS, signed the agreement on Tuesday with First minister Alex Salmond and CEO of Forth Ports, Charles Hammond.
Mr Smedegaard said: "We have always been very committed to this route and we are very satisfied that with good dialogue with the Scottish government and Forth Ports we were able to find a solution to maintain the service in light of the forthcoming sulphur requirements, which will pose enormous challenges for the transport industry."
Senior Vice President Kell Robdrup commented: "We would like to thank all stakeholders involved for their continued support for this environmentally-friendly mode of transport and we look forward to welcoming additional customers making use of the only ferry service directly linking the continent and Scotland".