THE queue to view the Queen's coffin at St Giles' Cathedral has now closed, the Scottish Government has said.

A large queue said to be around an hour long formed in Edinburgh on Tuesday morning as people line up to pay their respects to Queen Elizabeth.

The Queen's coffin was kept at St Giles' Cathedral overnight and some 26,000 people have viewed it since Monday, a tweet from the government said.

The coffin is set to remain at the cathedral until 5pm when it will get taken to Edinburgh Airport and onto London.

READ MORE: Patrick Harvie tells King Charles III that life 'isn't rooted in status or title'

The Scottish Government has asked that people do not attempt to join the queue now and endeavours will be made to ensure all those already waiting will be able to view the coffin before the lying at rest ends at 3pm.

Last night, the queue was said to have been around eight to 10 hours long at some stages.

“The queue has now closed. Please do not attempt to join the queue,” the government said on Twitter.

“Over 26,000 people have already had a chance to pay their last respects.

“We are doing everything we can to ensure that those currently in the queue can do so before 3pm, when the Lying at Rest will end.”