The Queen’s dressed coffin was placed on a decorated wooden frame as the congregation stood at the beginning of the service at Edinburgh’s St Giles’ Cathedral on Monday.
The King, the Queen Consort and other members of the royal family then walked to their seats alongside the coffin.
Charles took his place with his wife to his left and the Duke of York to his right.
At the beginning of the service, the Rev Calum MacLeod welcomed the royal family, “representatives of our nation’s life” and “people whose lives were touched by the Queen in so many unforgettable ways”.
He said: “And so we gather to bid Scotland’s farewell to our late monarch, whose life of service to the nation and the world we celebrate. And whose love for Scotland was legendary.”
The service is celebrating the life of the Queen and her connection to Scotland.
Mourners are expected to hear a reading of Ecclesiastes from First Minister Nicola Sturgeon, as well as words from Nigerian student Samuel Nwokoro, the Rt Rev Dr Iain Greenshields, the Moderator of the General Assembly of the Church of Scotland, and others.
The music incorporates European, Anglican and Scottish material drawn from composers of sacred music: Bach, Byrd, Purcell and Tallis.
The Psalms will have often been sung by the Queen and her family at Crathie Kirk in Balmoral.
As mourners enter the church, they will arrive to music sung by the choir of St Giles’ Cathedral, conducted by the Master of the Music Michael Harris.
The organ will be played by Jordan English, assistant organist of St Giles’ Cathedral.
The service will end with the national anthem before the royal party leaves.
Members of the public will then be able to view the coffin to pay their respects for 24 hours before it is taken to London to lie in state.