image copyrightReutersimage captionThe Danish man, pictured here in the blue suit, was identified in court as Herman H

A Danish man accused of the brutal murder of a young German backpacker on a ferry more than three decades ago has been cleared by a Finnish court.

The 52-year-old was accused of killing Klaus Schelkle, 20, and attempting to murder his girlfriend Bettina Taxis on the Viking Sally cruise ship travelling from Sweden to Finland in July 1987.

He was acquitted by judges in the city of Turku on Wednesday.

The case remains one of the longest unsolved murders in Finnish history.

Last year, police arrested the Danish suspect, who at the time of the attack was an 18-year-old scout and a passenger on the Viking Sally, after new information came to light.

At the beginning of the trial in May, prosecutors alleged that the man – identified in court only as Herman H – had earlier confessed to attacking the two German students. They said he should be sentenced to life in prison.

image copyrightReutersimage captionGerman backpackers Klaus Schelkle, 20, and Bettina Taxis, 22, seen here at an undisclosed location in the summer of 1987

However, the suspect denied all charges, and his defence lawyers said that any such comments did not prove his guilt.

The judges dismissed the prosecution's case, stating that the alleged confession did not mean that the defendant's guilt could be "considered proven or even probable".

They ruled that earlier police interviews with the suspect were also inadmissible as evidence.

A further setback for the prosecution was the refusal of a key witness – the defendant's former wife – to give evidence at the trial.

The judges said that the prosecution had failed to prove that the defendant had the motive and was the only person on board the ship who had the opportunity to commit the crime.

The court ordered the Finnish state to pay the defendant €3,000 (£2,575) in compensation.

In the 1987 attack, Mr Schelkle was bludgeoned to death and his girlfriend was severely injured as the couple slept on the outer deck of the ship.

Prosecutors said a hammer-like weapon was used and thrown overboard. The weapon was never found.

Years later the Viking Sally changed ownership and was renamed MS Estonia. It sank in the Baltic Sea off Finland while crossing from Tallinn to Stockholm in September 1994, with the loss of 852 lives.

There were 137 survivors. It was one of Europe's worst peacetime shipping disasters.