Alexander James Wightman, a volunteer officer with the Leith-based 7th Battalion of the Royal Scots territorial force, was en route to Gallipoli in 1915 when he was caught up in a catastrophic train smash at Quintinshill, near Gretna Green.
He was among nearly 500 Royal Scots travelling to Liverpool when their troop train smashed into a passenger train that had pulled up to allow an express to overtake.
The impact caused the troop train to overturn and land across the northbound track. Seconds later, the Glasgow-bound express ploughed into the wreckage, causing it to explode into flames.
Two goods trains in a nearby siding also caught fire, adding to the ferocity of the inferno.
The crash left 226 people dead, including 214 soldiers and 12 civilians, and hundreds of casualties.
Captain Wightman, who would later become a major, was one of just two officers to escape injury and travel on to Turkey.
However, just over a month later, his active service was abruptly ended when he was badly wounded while attempting to run telephone wires to trenches during the battle of Gully Ravine.
He was lucky to be alive, as the soldier with him was killed.
He only dodged death because a brass protractor inside a field message book he kept in his pocket stopped a bullet piercing his heart.
Hit several times, in both shoulders, the head and face, he lay in the searing Turkish sun for 17 hours before being rescued.
He was later awarded the Military Cross medal for gallantry.
Though Susan Hughes never met her grandfather, who died two years before she was born, she did inherit his life-saving notebook. And now, 100 years on, the artist has received a letter he wrote while recovering in a military hospital in Malta.
She said: “I was always acquainted with the rail disaster as a child, through family folklore.
“Everything I knew about my grandfather was really defined by Gallipoli and the train crash.
“He told my grandmother that the scenes he witnessed that day were worse than any he later saw in battle.”
The survivors were not allowed time to comfort injured comrades, grieve the dead nor attend their funerals, according to Mrs Hughes. Instead they were ordered to continue their journey to Gallipoli.
She was “absolutely astonished” when the regiment handed her the letter last month.
“It gives a bit of insight into his character – the way he played down his injuries so as not to worry the people back home.
“It hides the fact that he was very badly wounded. It is a wonderful link with the past. It is utterly amazing to have it – and seeing his handwriting is really nice,” she said.
In it, the officer describes the crash, the battlefield and the injuries he has suffered. He admits “my head is rather sore” and suggests his “nerves are a bit off”.
Which is hardly surprising, says Mrs Hughes. “Lying in blistering heat, where the least movement would have given his position away, my grandfather was wounded a second time, and then a third, in the arms and head. ”
Mrs Hughes and hundreds of other are today joining First Minister Nicola Sturgeon and Princess Anne at a centenary commemoration to pay tribute to the victims of the rail disaster.