LONDON — Most weddings are a challenge to coordinate. Add 600 guests, 100,000 visitors, 5,000 journalists and millions of viewers, and you have a royal challenge — especially for those tasked with keeping Prince Harry and Meghan Markle's big day safe.

Police began preparing for the May 19 event as soon as the couple decided on the details.

“The smallest of things could go wrong and it could be regarded as a disaster in one way or another, so you always want to make sure you've done all your planning,” said former London Metropolitan Police Commissioner Bernard Hogan-Howe.

When it comes to secure sites, it doesn’t get much tighter than a castle complete with a moat.

Yet with more than 100,000 visitors expected to descend on Windsor, the small historic town where the wedding is being held, along with VIPs and 1,200 members of the public who have been invited, those working to keep the wedding safe will need to be ready for a variety of challenges in the castle, on trains and around town.

With that in mind, police started putting security measures into force months before the wedding. Automatic license plate recognition technology has been checking vehicles coming into town, while officers are also conducting random stops. Large steel and concrete barriers have gone up inside and outside Windsor to prevent vehicle attacks. Sniffer dogs routinely search mailboxes, and even the drains have been searched and sealed.

Some 3,000 police officers are expected to flood Windsor, with authorities focusing on four main threats, according to security experts: terrorism, royal obsessives, public protests and crimes of opportunity, like pickpocketing.

A police officer on duty at Windsor Castle. Simon Dawson / Reuters file

“You have a celebration and a royal family that like to be accessible to the public. That has to be matched against security, and they’re not always happy bedfellows,” said former London Metropolitan Police Commander Robert Broadhurst.

That’s certainly the case when it comes to the royal couple's planned ride in an open-topped Ascot-Landau carriage through Windsor after the ceremony — likely to be the weekend's biggest security headache.

“The carriage is several hundred years old, it's unprotected, it's not ballistic proof, it's not bullet-proof, it's not stab-proof, it's nothing-proof,” said Broadhurst, who coordinated security operations at the 2012 Summer Olympics in London and the 2011 wedding of Prince William and the former Kate Middleton (who rode in an open-topped 1902 State Landau carriage from their marriage ceremony at Westminster Abbey to the celebration at Buckingham Palace).

“You have a crowd that's largely unsearched, who could have anything on them, from weapons to paint to graffiti to maggots to confetti, all of which poses a threat,” Broadhurst said.

The Ascot Landau, left, will be used in the case of dry weather at the wedding. The Scottish State Carriage on the right will be used if it rains. Victoria Jones / Reuters

Keeping with British tradition, most police will not carry firearms, although armed officers will be on the streets ready to respond if needed. There will also likely be a police helicopter or two circling above the crowd, with cameras that can identify faces, as well as tiny details like the time on your watch, according to Broadhurst.

The local force, the Thames Valley Police, will coordinate the security effort with help from London’s Metropolitan Police, who patrol inside the castle. It will be the biggest security operation the force, used to high profile events, has ever had to cope with.

A key part of the operation will be the intelligence work leading up to the wedding.

Police are ready to identify potential troublemakers in advance to stop them from coming to Windsor, and be ready to intercept any threats that crop up on the day.

Authorities will have some help in their efforts from furry, four-legged friends.

Six mounted police officers will patrol the crowds, with an additional four escorting the royal carriage. British Transport Police officers in stations and on trains, some armed and accompanied by search-and-security dogs, will patrol transport hugs in and around the town.

Thanks to Markle’s American roots, thousands of Americans are expected to make the trek to Windsor, lending an international element to the security operation.

“The police service in the U.K. always works closely with its partners, in particular the U.S." Broadhurst said. "And a case like this where of course the bride is a U.S. citizen, that really ups the interest of our American colleagues — quite rightly.”

The absence of heads of state at the wedding will make the security a bit less of a challenge. So will its location in Windsor, a town of around 30,000 residents about 20 miles west of London, where Queen Elizabeth II lives for part of the year.

The town is much smaller than the capital, London, and will likely stop in its tracks to watch the wedding, making it somewhat easier for police to patrol. Though tens of thousands of people lining narrow streets presents its own set of challenges, including crowd control and petty crime.

Police officers on duty at Windsor Castle. Forces have planned for months ahead of the royal wedding on Saturday. Simon Dawson / Reuters file

All this preparation doesn’t come cheap, though. The price tag hasn't been publicly broached yet, but police costs for William and Kate’s wedding added up to around $8.5 million, including almost $3.8 million on police overtime, according to figures obtained by the Press Association through Freedom of Information requests.

It's worth every penny to make sure the wedding runs safely and smoothly, however, said Hogan-Howe, the former London police commissioner.

“It's vitally important — a huge amount of work goes into it and you make sure everyone gets into the event safely,” he said. “It gets beamed around the world and it's a great image for Britain and it's also a great image for the relationship, I think, between Britain and America.”