Nicola Sturgeon has called for reflection on the "horrors of the Great War" as Scotland marks the 100th anniversary of the Battle of the Somme.
A vigil is under way at the Scottish National War Memorial at Edinburgh Castle to remember the thousands of Scots who gave their lives in the bloodiest battle in British Military history.
Representatives of regimental associations gathered at the memorial will respect a two-minute silence at 7.30am - the moment when soldiers were led into battle a century ago.
It follows a service on Thursday night which saw the castle floodlit red to mark the anniversary.
The First Minister will attend a remembrance event at the Thiepval Memorial to the Missing in France on Friday.
Ms Sturgeon said: "It is now exactly 100 years since the start of the Battle of the Somme - the opening day of which has gone down in history as one of the bloodiest in the history of armed conflict.
"Fifty-one Scottish battalions were involved, and the losses suffered by those units - and those from the other countries involved - were on an almost unimaginable scale.
"Barely a single community in Scotland was left untouched by the battle. Across Scotland communities are now remembering those who gave their lives, and a whole century on from the devastation and suffering of the Battle of the Somme, we should all reflect on the horrors of the Great War and give thanks that our continent now lives in peace."
On the eve of the anniversary the Rev Neil Gardner of Canongate Kirk said prayers for those killed and wounded and led the singing of Abide With Me on the steps of the war memorial, before candles were taken inside and placed on a casket containing the original Roll of Honour for the fallen of the First World War.
The candles were being guarded overnight by representatives from units including the Wrens, the Royal Navy and several Scottish army regiments, standing by the casket with their heads bowed.
Beginning on July 1 1916, the Battle of the Somme was intended to achieve a decisive victory for the British and French against Germany's forces.
By the end of the conflict on November 18, the British had suffered 420,000 casualties, with 19,240 troops dying on the first day alone.
Fifty-one Scottish battalions took part in the campaign, including the 16th Battalion Royal Scots which was largely composed of professional and amateur sportsmen and their supporters.
Major General Mark Strudwick, chairman of the Trustees of the Scottish National War Memorial, said: "The courage and sacrifice of the British soldiers who fought at the Battle of the Somme should never be forgotten.
"Few words conjure the tragic scale and staggering loss of life during the 141 days that battle raged.
"One hundred years on we come together to honour them, to remember them and to ensure their memory and legacy lives on for generations to come."