“We have received confirmation from his lawyer that the ruling is an acquittal,” said Anders Jörle at the Swedish foreign ministry to Sveriges Radio.
The teenager was arrested in July last year on suspicion of having raped a woman on the beach. According to media reports, the boy had been holidaying at the Fuengirola resort when he met the young woman.
The boy was taken into custody where he has remained since his arrest, denied permission to leave the country.
Rape charges were duly brought against the teenager and a trial in a juvenile court in Malaga was opened in June.
The court ruled on Friday to acquit the young Swede on all counts.
The boy’s mother expressed satisfaction at the ruling which allows her son to return home to Sweden.
“It feels wonderful,” she said to Sveriges Radio.
During the course of his detention, the teenager was given support from a local Swedish resident who assisted in his schooling and the case was monitored by the Swedish honorary consulate in Malaga.