A judge on Wednesday acquitted crew members and a top maritime official of causing a massive oil spill off Spain in 2002, one of Europe's worst environmental disasters.
The Spanish court however sentenced the Greek captain of the Prestige oil tanker to nine months in prison for resisting attempts to tow the wreck away from shore before it spilled its load.
Eleven years after the Prestige was wrecked in a storm, the court ruled that neither Captain Apostolos Mangouras nor the Spanish maritime chief who ordered it out to sea were to blame for the vast oil slick that followed.
When it broke in two after six days damaged and adrift, the Prestige spilled 63,000 tonnes of fuel oil into the sea, coating beaches in Spain, France and Portugal with black gunk and killing tens of thousands of sea birds, according to the court ruling.
The disaster prompted 300,000 volunteers to come out to clean the beaches.
Judge Juan Luis Pia of the Galicia regional high court said Mangouras and Greek chief engineer Nikolaos Argyropoulos were not responsible for the sinking of the Prestige, which had structural damage before it set to sea.
He sentenced Mangouras, 78, to nine months for initially refusing to be towed out to sea as Spanish officials tried to lessen the potential environmental damage.
But due to his age Mangouras will not go behind bars.
The ruling also absolved Jose Luis Lopez-Sors, the head of the Spanish merchant navy at the time, saying his initial decision to order the ship away from Spanish shores had been correct.
He and "the crew of the Prestige should be absolved" of the charge of causing the sinking of the ship since they did not act intentionally and did not display serious negligence, Pia said in his ruling.
The judge ruled that Lopez-Sors, "faced with an emergency and after a rigorous and capable technical assessment, made a decision that was debatable but partially effective, entirely logical and clearly prudent".
A fourth defendant, the ship's second officer Ireneo Maloto of the Philippines, is on the run.
During his trial Mangouras blamed the spill on the order to tow the ship out to sea after it sent out a distress call due to a crack in its hull.
Mangouras, along with lawyers representing Mare Shipping, the company that ran the Prestige, said the order caused it to break up and spill its load.
"The ship was cracked and they sent it out into the ocean," Mangouras told the court in November 2012. "They sent us in a floating coffin... to drown."
Plaintiffs had called for prison sentences of between five and 12 years for the three defendants.
The court heard months of testimony from more than 200 experts and witnesses in the trial that opened in October 2012.
Spain's current conservative Prime Minister Mariano Rajoy was deputy premier at the time of the spill and initially downplayed the gravity of the accident.
He repeatedly described the black spots that appeared in the sea where the tanker went down as "small threads of clay".
Environmental campaign group Greenpeace complained ahead of the verdict that the trial did "not include those who are really politically responsible, not the companies involved".
"It is a sentence to wrap up the case and will not prevent another Prestige from being possible," it said in a statement on Wednesday.