Scottish Deputy First Minister Nicola Sturgeon has said that the thoughts of "everybody across Scotland" are with the bereaved.
She said: "It is impossible to imagine the grief and loss they are experiencing but they should know that the thoughts and prayers of everybody across Scotland are with them at this unimaginably difficult time.
"Our thoughts are also with those who remain in hospital. We all hope and pray that those who have suffered injuries make a full and speedy recovery ...
"The police are not just dealing with a very complex incident, they are also dealing with the loss of colleagues, which makes this situation all the more difficult for them."
More top news
The experts suggest smoking “stigma” has inadvertently diverted research attention away from lung cancer.
Theresa May is facing calls for a full police inquiry after the leak of secret discussions by the UK’s top national security body.
Gusts of up to 75mph will hit the south-west coast of the UK.