“The accusation has not been proven,” the judge said after the trial in the Lesbos capital Mytilene.
The firefighters from Spain and volunteers from Denmark, who faced up to 10 years in prison according to Amnesty International, enjoyed massive support from aid groups, with many sympathisers on hand for the verdict.
“A great victory for humanitarian aid,” Spanish group Proem-AID tweeted after the ruling.
¡Se ha hecho JUSTICIA! Manuel Blanco, Julio Latorre y Quique Rodríguez han sido absueltos de todos los cargos.
Sin duda, esta representa una gran victoria de la ayuda humanitaria.
¡Volveremos para salvar vidas! #CondenadosAsalvarVidas
— PROEMAID (@proemaid) May 7, 2018
Two Greek coastguards had testified that the defendants, who were arrested in January 2016, had not informed the authorities of their rescue mission, and that they were not properly equipped for it.
According to one of the Spanish firefighters, Manuel Blanco, the Greek coastguard arrested them in the middle of the night after they returned from a rescue mission, which had been called off as the boat being sought could not be located.
The firefighters, from the southern Spanish city of Seville, had taken part in multiple refugee and migrant rescue missions in the Aegean.
Andalusian regional justice minister Rosa Aguilar was among the Spanish delegation along with representatives of the city of Seville.
The Spaniards worked as volunteers for Proem-AID and the Danes for Team Humanity as they sought to aid thousands of migrants, mostly Syrians, risking their lives to reach Europe via Lesbos and other Greek islands.
Some 5,100 migrants died in 2016 crossing the Mediterranean, according to the International Organization for Migration.
More than 1,000 migrants, including many children, drowned in 2015 and 2016 in the narrow stretch of sea separating the Turkish coast from the Aegean islands.
“Humanitarian assistance cannot and should not be criminalised,” one of the Danish defendants, Salam Aldin, told AFP.
Many fishermen from the small port of Sykaminia, one of the main landing sites for refugee boats at the time, were at the court to support Aldin.
The defendants “were only helping to save lives” while the Greek coastguard was overwhelmed, said a lawyer for the Spanish firefighters, Haris Petsikos.
The Spanish defendants met in early April with Spanish Foreign Minister Alfonso Dastis, who was among the first to welcome the news of their acquittal.
“I am very pleased,” he said in a tweet, hailing their “superb humanitarian work in the Mediterranean.”
In Madrid, Amnesty issued a statement Monday backing the Spanish defendants, saying they had sought to “prevent children, women and men from dying through drowning”.
Amnesty said the trial was “absurd” and showed “moral confusion by those who try to criminalise actions of solidarity and to intimidate the defenders of human rights.”