A man accused of killing Denise Thiem arrives at the court in Astorga

A man in Spain admitted killing a US woman on a pilgrims' hiking trail as authorities Tuesday investigated the circumstances of the killing, officials said.

The 39-year-old man had pleaded his innocence but later admitted killing Denise Pikka Thiem, 41, from Arizona, after the judge received new evidence, a court statement released late Monday said.

"After a report by the forensic doctor he voluntarily changed his statement and admitted ending the life of the US pilgrim," the court said.

The judge in the northern town of Astorga ordered the suspect to be held in custody without bail on homicide charges and ordered police to gather further evidence.

Autopsy results showed that a body found partly hidden by branches was that of Thiem, it added.

Police arrested the man on Saturday after five months of investigations.

Thiem disappeared in April while walking the Camino de Santiago or Way of Saint James, a popular pilgrim trail in northwestern Spain.

Hundreds of thousands of tourists and Roman Catholic pilgrims hike the trail each year, staying at hostels on their way to the cathedral city of Santiago de Compostela and the shrine of St. James.

The court said it denied the man bail because of the seriousness of the alleged crime and "to prevent him trying to destroy evidence and committing similar deeds, considering that he was already suspected of attacks against other victims".