It is a tale that dates back 100 years and concerns the cruel death of two young brothers, the public hanging of their father and a forensic pathologist known as The Scottish Sherlock Holmes.

This week the remarkable story of William and John Higgins, aged four and seven, was brought to a close when the two were finally given a proper funeral service in Edinburgh.

Their remains had laid in store at the pathology department of the University of Edinburgh for almost a century, since they were discovered tied together in a flooded West Lothian quarry in 1913. They had died two years earlier and their father Patrick, 38, a widower, was found guilty of their murder and hanged in Edinburgh.

This week, a mass and cremation was arranged for the Higgins brothers following a request from a distant cousin who lives in Las Vegas and discovered the fate of the boys after researching her family history.

Some body parts were retained by the University of Edinburgh after Sir Sydney Smith - a forensic pathologist known as the Scottish Sherlock Holmes - and his colleague Sir Harvey Littlejohn, another forensic scientist working at the university, kept them aside following the post-mortem examination in 1913 Maureen Marella, the boys' cousin, has in the past criticised Sir Sydney for his actions. She earlier told reporters: "I think Sir Sydney Smith did a terrible thing taking the body parts,"

The university said that following recent discussions with Ms Marella "and in accordance with the family's faith", the university held a requiem mass at the university's Catholic chaplaincy, followed by a cremation ceremony at the Mortonhall Crematorium.

A spokesman for the university said the ceremony was held in private to respect the wishes of the boys' surviving relatives and to protect the privacy of others using the crematorium.

Around 20 people attended the service.

The university said modern newspaper reports that referred to the actions of the scientists as "bodysnatching" were "emotive and extremely unhelpful", adding that a cultural shift had taken place.

It was felt at the time that the remains would provide valuable insights for the students of forensic medicine.

Prior to being contacted by Ms Marella, the university said it was not aware the boys had any living relatives.

Professor David Harrison, head of pathology at the University of Edinburgh, said: "These events took place almost 100 years ago and clearly there has been a major change in medical ethics since then.

"We hope the ceremony accords the dignity and respect due to the two young boys and are pleased that this case has been drawn to a rightful close."

It is understood that limbs and organs were removed for study and other body parts were buried in paupers' graves at the time.

Sir Sydney later told how he had wrapped the body parts to be studied in a paper parcel and put them on the luggage rack on the train he took back from the post-mortem examinations in Linlithgow.

Even though the bodies had been in the water for a long time the stomach contents had been preserved and the scientists were able to tell that the boys had eaten a meal of Scotch broth about an hour before they were murdered. Police traced a woman who confirmed that she had given soup to John and William Higgins one evening in early November 1911.

There was further interest as much of the bodies had turned into adipocere, a rare yellow waxy substance formed when natural fats solidify.

Their boys' father, who had been odd-jobbing around the district, was said to have "slept out at night and cooked his food in his working shovel".

Sir Sydney gave important evidence that led to the prosecution of Higgins, who was hanged at Calton Jail on October 2 with a crowd of 500 outside. It was the city's first execution of the 20th century.

The Glasgow Herald reported: "A large crowd, drawn by morbid curiosity, gathered to see the hoisting of the black flag. Hundreds lined the railings skirting the top of the cliff which overlooked the prison. Others lined Regent Road opposite the prison gate, while many took up their stance on the North Bridge ... an itinerant fiddler whiled away the time of waiting with mournful selections."

The Herald reported during the trial that the boys had been seen being led by the hands close to the quarry around the time of their disappearance.

It also said the "loneliness of the quarry accounted for the long time elapsing before the bodies were found".

Higgins only admitted his guilt to a priest shortly before his execution.

The boys' mother, Bridget, had died some time earlier.

Modern forensic experts in the university pathology department familiar with the case said it had emerged that Higgins took the boys to a children's home but they were refused because of their Catholic faith. It was said that he then tried another children's home but they would not take them because the family had no money.

Chris Paton, a genealogist from Scotland's Greatest Story who worked closely with the family, said yesterday: "We are extremely grateful to the university for doing the right thing in releasing the remains of the two Higgins boys, and for their handling of both the mass and cremation arrangements, which have finally provided the boys with a dignity in death that they so fully deserved so many years ago."