The most complex security operation London has ever seen is under way.
The Queen is lying in state, and thousands of people are on the streets of the capital queuing to pay their respects, with many more to come.
In the hours and days ahead of the funeral on Monday, the Japanese emperor, kings and queens, the US president, and heads of state from across the globe will assemble in London. They will then all go to Westminster Abbey, which does not have any permanent security perimeter, for a very public funeral.
All of this will be played out in front of hundreds of millions of television viewers around the world, providing a tempting target for international terrorists.
It has required a security response unprecedented in scale. MI5 and GCHQ are working behind the scenes with counter terrorism police, the Metropolitan Police has reinforcements from forces across the country, and military personnel and civilian stewards are all playing a role.
For now, the queue of people waiting to pay their last respects, snaking its way from Lambeth Bridge along the South Bank, is the most vulnerable point. The queue will be there night and day until the early hours of Monday morning.
As a first line of defence against the terrorist threat, the police are asking the public to be their own eyes and ears, to look out for each other, stay vigilant, trust their instincts and report anything that does not feel right. The government has hired hundreds of stewards from private security firms to help with queue management. Some 1,500 military personnel have also been deployed since Tuesday night among them Gurkhas and Paratroopers, Royal Navy Police and Royal Military Police, and RAF personnel in their blue-grey uniforms. A military Wildcat helicopter has made several flights over Westminster.
Behind the scenes, the security service MI5 is watching for any changes of behaviour by "subjects of interest", people suspected of involvement in violent extremism and terrorism. GCHQ will continue to monitor all forms of telecommunication. Armed police officers with binoculars have already been visible on rooftops in Westminster.
Watching the queue are police specialists trained to identify people preparing a terrorist act. At the main police control room just south of Lambeth Bridge officers are watching footage from hundreds of fixed CCTV cameras. Extra, mobile CCTV cameras have been put in at vulnerable sites or where there are holes in the coverage. Dogs specially trained to sniff out explosives and firearms are passing periodically through the crowds.
Thousands of police officers are being deployed in central London each day, but the Met were keen to emphasise the number of reinforcements being provided by other forces. They do not want the people who live in London to think that normal day-to-day policing has been abandoned.
Under what is known as "mutual aid", the Met are borrowing hundreds of officers from forces outside London - from as far away as Scotland and Northern Ireland. These are being provided under longstanding plans for a national mobilisation for the monarch's funeral, which include a wide range of specialist officers. For example explosives sniffer dog teams from West Yorkshire and Lancashire have been patrolling the Mall this week.
The Met want to stress that while the event is unprecedented, much of the policing will be familiar to its officers.
Lone actor threat
"At every event that we police in London, we are considering the threat from terrorism, the threat from crime, looking after people at the same time," said Deputy Assistant Commissioner Stuart Cundy. "So whilst it is a unique event we are well versed, officers are well trained and also experienced at policing such large events."
The scale of this week's security operation has been compared to the London Olympics. But in 2012 the public spent much of their time in venues where they had to pass through security checkpoint. At the lying-in-state, the checkpoint is only at the entrance to Westminster Hall, with people queuing for many hours before they reach that point.
It can also be compared to the funerals of Queen Elizabeth the Queen Mother and Princess Diana, but the extraordinary number of heads of state visiting the capital for this event makes it much more complicated.
The threat has also changed. What are known as "lone actor" attacks using vehicles as weapons, or knives that can be bought from supermarkets, have become commonplace in the last decade
The heads of state will start arriving as early as Friday. They will include Emperor Naruhito of Japan, kings and queens from Europe, Tonga and Bhutan, the Emir of Qatar, and presidents and prime ministers from dozens of countries. Those with particularly high-risk profiles include US President Joe Biden, and Isaac Herzog, the president of Israel. The security service from each of their countries will have their own concerns.
But Mr Cundy says his force "is very used to working with those who are involved in protection of dignitaries from across the world".
Heads of state will attend a reception with the King at Buckingham Palace on Sunday night. And then on Monday morning they will gather at Westminster Abbey for the funeral itself. Initially police wanted most of them to use transport provided by the UK government to travel there, but the plans have now been revised. President Biden will be allowed to use his personal armoured car, "the Beast", and some other heads of state will also use their own vehicles.
Before then a huge area around the abbey will have to be checked. Every manhole cover will be lifted, checked and sealed. Each lamp post will be opened and examined. Anywhere where an improvised explosive device could be hidden needs to be peered into. Dogs sniffing for explosives will pass through the abbey and surrounding areas time and again.
On the morning of the funeral itself even more police spotters will be out on rooftops. Firearms officers will be discretely positioned across the secure area. The SAS will be on standby.
Usually heads of state only gather together in extremely tightly-controlled security environments such as the UN General Assembly, but the Queen's funeral will be a public event. It is designed to be seen, and the Royal Family will want to be seen. But that brings with it plethora of security difficulties.
"Ceremony and security are not happy bedfellows," says former Commander Bob Broadhurst, who was in charge of security for the Olympics. "I don't know if there is another large country in the world that would allow this to happen."
In the meantime an unanticipated problem for the police has arisen since the Queen's death - that of anti-monarchy protesters shouting slogans like "Not my King" at ceremonial events. Some have been arrested, and in Scotland two have been charged.
The National Police Chiefs Council has since issued guidance to officers on how to balance the right to protest with the right to grieve and reflect, though this guidance has not been made public.
On Monday, Paul Powlesland. a barrister who specialises among other things in protest rights stood outside Parliament with a blank sheet of paper, and was approached by a police officer asking for his details.
After the new guidance was issued, he went back to Parliament on Tuesday with 30 other people to see what police officers would do. He had a placard reading "Not my King" and he said that this time he was very differently treated. He was left alone.
"It seems that the media furore and also the public backlash to this heavy-handed policing has had its affect", Mr Powlesland said.
It was a reminder that even while involved in a huge and complex security operation, police officers will also need to be sensitive.