The final day of Robert Smith's life in Dumfries "broke grey and dull".
The 19-year-old had been convicted of murder, rape, robbery and attempted murder near the village of Cummertrees and sentenced to hang.
The laws of the land were about to be changed but on 12 May 1868 the scaffold was set up for him next to the junction of St David Street - now Irish Street - and Buccleuch Street in Dumfries.
He was about to become the last man to be publicly hanged in Scotland.
The story of his crimes - dubbed the Annandale Murder - had gone around the world in the Victorian era.
"Crimes of the magnitude of Smith's are fortunately rare in this district," reported the Dumfries and Galloway Standard at the time.
However, Dumfries had seen another execution at the same spot six years before when Mary Timney became the last woman to be publicly hanged in Scotland.
The cases, however, had few similarities.
"Our readers must still have a keen recollection of the vast amount of sympathy exhibited by the public in the case of Mary Timney, and the strenuous exertions that were made to obtain a commutation of her sentence," the newspaper reported.
"But no such feeling has been manifested, and no such steps have been taken, on behalf of the convict Smith.
"Even the sincerest advocates of the abolition of capital punishment seem to have been confounded by the singular atrocity of his crimes."
Kathleen Cronie, of Mostly Ghostly Tours, has researched Smith's story closely with a talk planned at Annan Museum later this month.
"It is a very grim case, very macabre," she said.
"On 1 February 1868 he committed an atrocious murder in the Crofthead Wood area near Cummertrees.
"He was subsequently found in Dumfries. He didn't really try to cover his trail too well and he did assault another lady who he thought could implicate him in the crime."
The killing of Thomasina Scott - the young girl he murdered - generated significant interest.
"When you do have a scan through online you find newspapers from all over the world reporting on it," said Ms Cronie.
"It must have been a huge case at the time given its significance in terms of the fact that Robert Smith would be the last person publicly hanged in Scotland - it really must have gripped the public's attention."
It was on a rainy Tuesday morning when the "sun sought shelter from sight behind a veil of clouds" that the teenager from Eaglesfield went to meet his fate.
He was said to have walked with "unfaltering step and a steady countenance" towards the spot outside the Dumfries prison where he would be hanged.
A crowd which was "at no time large" - estimated at about 600 at its peak - had gathered to watch.
"It was mostly composed of young people of the working class and contained more females than was at all creditable to the sex; few persons were present from the country," commented the Standard.
"The crowd was very orderly and decorous."
"Robert Smith was partially screened from view - they wouldn't have been able to see much at all," added Ms Cronie.
"This was just before the law changed and meant that they had to execute criminals behind closed doors."
However, around the appointed hour of 08:00 as Smith met his fate, the crowd let out a "fearful cry" and many were reported to have turned their backs on the "terrible spectacle" and some ran from the scene.
By 08:15 it was all over and afterwards a cast of the criminal's head was taken - it remains in Dumfries Museum to this day.
But the tide of public opinion - and the law - was turning against this form of justice.
As the executioner, Thomas Askern, left town after the hanging, he was accosted by a man on the station platform who told him: "I hope we shan't see you again for a long time to come."
Indeed, the law would soon be passed to ensure executions could only take place in prisons.
"There had been some efforts made, not to gain a reprieve for Smith, but because the bill was going to be passed they wanted to try and hurry it along a little bit so that his execution would be carried out in private but that just became impossible," said Ms Cronie.
"So Dumfries does have that very dubious honour of hosting that last public execution."