London (CNN) US President Donald Trump's visit to the UK in July cost police around £18 million ($23.8 million), police estimate.

The amount is more than 10 times the cost for Barack Obama's last journey to Britain as president in 2016.

After being delayed several times, Trump's controversial four-day visit encountered large protests in London and throughout the country.

Organizers estimated that 250,000 people took part in the main rally, which required police to close off Trafalgar Square in the center of the capital after it reached capacity.

Nearly 10,000 police officers from across the country were deployed to cover the events, performing more than 26,000 shifts, Sara Thornton, head of the National Police Chiefs' Council, said.