The police operation to provide security for Donald Trump during his visit to the UK drained almost £18m from the public purse.

Thousands of officers were deployed to cover the president’s three-day visit in July, the largest police mobilisation since the 2011 riots.

Sara Thornton, chair of the National Police Chiefs' Council (NPCC), said a “significant operation” was undertaken in the four areas of the country Mr Trump visited, as well as at various protests staged against him.

“Nearly every force supported the operation with nearly 10,000 officers deployed from all over the country, performing over 26,000 shifts,” she said.

Donald Trump UK visit: protests, placards and putting Show all 100 1 /100 Donald Trump UK visit: protests, placards and putting Donald Trump UK visit: protests, placards and putting Britain's Prime Minister Theresa May and US President Donald Trump walk to a joint news conference holding hands Reuters Donald Trump UK visit: protests, placards and putting People march holding anti-Trump signs in Edinburgh while the US. President is visiting Trump Turnberry Luxury Collection Resort in Scotland Getty Donald Trump UK visit: protests, placards and putting President Donald Trump and first lady Melania Trump depart from Glasgow Prestwick Airport REUTERS Donald Trump UK visit: protests, placards and putting Trump on the back Getty Donald Trump UK visit: protests, placards and putting President Donald Trump waves whilst playing a round of golf at Trump Turnberry Luxury Collection Resort Getty Images Donald Trump UK visit: protests, placards and putting Donut TrumpScotland United Against Trump demonstrators gather at the Scottish Parliament in Edinburgh PA Donald Trump UK visit: protests, placards and putting Donald Trump plays a round of golf at Trump Turnberry Getty Images Donald Trump UK visit: protests, placards and putting People march holding anti-Trump signs Getty Donald Trump UK visit: protests, placards and putting US President Donald Trump plays a round of golf on the Trump Turnberry resort in South Ayrshire, where he and first lady Melania Trump are spending the weekend. PRESS ASSOCIATION Photo. Picture date: Saturday July 14, 2018. See PA story POLITICS Trump. Photo credit should read: Andrew Milligan/PA Wire Andrew Milligan PA Donald Trump UK visit: protests, placards and putting Trump waves form golf course Getty Donald Trump UK visit: protests, placards and putting TURNBERRY, SCOTLAND - JULY 14: Scottish stand-up comedian Janey Godley gives a high-five to a police officer as she holds a sign in protest on the beach outside near Trump Turnberry Luxury Collection Resort during the U.S. President's visit to the United Kingdom on July 14, 2018 in Turnberry, Scotland. The President of the United States and First Lady, Melania Trump on their first official visit to the UK after yesterday's meetings with the Prime Minister and the Queen is in Scotland for private weekend stay at his Turnberry. (Photo by Leon Neal/Getty Images) Leon Neal Getty Images Donald Trump UK visit: protests, placards and putting Trump goes for a stroll Getty Donald Trump UK visit: protests, placards and putting Trump blimpA giant balloon depicting US President Donald Trump as an orange baby is launched as protesters gather in the Meadows, after taking part in the Scotland United Against Trump march through the streets of Edinburgh AFP/Getty Donald Trump UK visit: protests, placards and putting U.S. President Donald Trump drives his golf buggy REUTERS Donald Trump UK visit: protests, placards and putting A Greenpeace protester flying a microlight passes over Donald Trump's resort in Turnberry PA Donald Trump UK visit: protests, placards and putting President Donald Trump and first lady Melania Trump look at the media during their arrival on Air Force One at Glasgow Prestwick Airport in Scotland AP Donald Trump UK visit: protests, placards and putting Scotland United Against Trump demonstrators gather at the Scottish Parliament in Edinburgh PA Donald Trump UK visit: protests, placards and putting Security and police teams surround the perimeter of Trmup's golf course Getty Donald Trump UK visit: protests, placards and putting Scotland United Against Trump demonstrators PA Donald Trump UK visit: protests, placards and putting Teams of police officers patrol the beach outside near Trump Turnberry Luxury Collection Resort Getty Donald Trump UK visit: protests, placards and putting Pro-Trump supporters demonstrate outside the US Embassy in support of President Donald Trump's visit to the UK, in London EPA Donald Trump UK visit: protests, placards and putting Scottish Labour leader, Richard Leonard speaks to crowd PA Donald Trump UK visit: protests, placards and putting Ex-pat AFP/Getty Donald Trump UK visit: protests, placards and putting Demonstrators hold placards near the golf resort owned by US President REUTERS Donald Trump UK visit: protests, placards and putting Protesters wear orange face makeup Getty Donald Trump UK visit: protests, placards and putting Pro-Trump supporters demonstrate outside the US Embassy in London EPA Donald Trump UK visit: protests, placards and putting Trump protestors on the beach near to the Trump Turnberry resort PA Donald Trump UK visit: protests, placards and putting Protestors against the UK visit of US President Donald Trump near Aberdeen AFP/Getty Donald Trump UK visit: protests, placards and putting A mounted police officer patrols anti-Trump rally Getty Donald Trump UK visit: protests, placards and putting Trump supporter Bill McGibbon outside his cottage near to the Trump Turnberry resort in South Ayrshire PA Donald Trump UK visit: protests, placards and putting Trafalgar Square is filled with protesters against the UK visit of US President Donald Trump holding up placards as they take part in a march and rally in London on July 13, 2018. Tens of thousands of protesters demonstrated in London on Friday against US President Donald Trump, whose four-day visit to Britain has been marred by his extraordinary attack on Prime Minister Theresa May's Brexit strategy. / AFP PHOTO / Tolga AKMENTOLGA AKMEN/AFP/Getty Images TOLGA AKMEN AFP/Getty Images Donald Trump UK visit: protests, placards and putting Queen Elizabeth II and President Donald Trump inspect an honour guard at Windsor Castle Getty Images Donald Trump UK visit: protests, placards and putting Demonstrators on the 'Stop Trump' march through London, as part of the protests against the visit of US President Donald Trump to the UK. PRESS ASSOCIATION Photo. Picture date: Friday July 13, 2018. See PA story POLITICS Trump. Photo credit should read: Joe Giddens/PA Wire Joe Giddens PA Donald Trump UK visit: protests, placards and putting Queen Elizabeth II stands with US President Donald Trump and his wife, Melania, during their visit to Windsor Castle PA Donald Trump UK visit: protests, placards and putting Donald Trump walks ahead of Queen Elizabeth AP Donald Trump UK visit: protests, placards and putting LONDON, ENGLAND - JULY 13: Protesters take part in a demonstration against President Trump's visit to the UK in Trafalgar Square on July 13, 2018 in London, England. Tens of Thousands Of Anti-Trump protesters are expected to demonstrate in London and across the country against the UK visit by the President of the United States. Many people disagree with his policies that include migrant family separation, discrimination of transgender military personnel and changes to laws protecting women's sexual health. (Photo by Chris J Ratcliffe/Getty Images) Chris J Ratcliffe Getty Donald Trump UK visit: protests, placards and putting Donald and Melania Trump listen to the Coldstream Guards, play the US national anthem next to the Queen REUTERS Donald Trump UK visit: protests, placards and putting Protesters in Windor Getty Images Donald Trump UK visit: protests, placards and putting US President Donald Trump and first lady Melanie Trump are greeted by Queen Elizabeth II, during an arrival ceremony with the Guard of Honour at Windsor AP Donald Trump UK visit: protests, placards and putting Queen Elizabeth II waits to greet US President Donald Trump as he arrives by helicopter AFP/Getty Donald Trump UK visit: protests, placards and putting Ed Miliband joins the march Angela Christofilou Donald Trump UK visit: protests, placards and putting PM and President Getty Donald Trump UK visit: protests, placards and putting Protestors hold banners AP Donald Trump UK visit: protests, placards and putting UK meets US AFP/Getty Donald Trump UK visit: protests, placards and putting Protests at Trump visit Angela Christofilou Donald Trump UK visit: protests, placards and putting Trump and May Getty Donald Trump UK visit: protests, placards and putting Protests at Trump visit Will Gore Donald Trump UK visit: protests, placards and putting Protesters for the 'Stop Trump' Women's March gather in London AP Donald Trump UK visit: protests, placards and putting US President Donald Trump and Britain's Prime Minister Theresa May hold a joint press conference AFP/Getty Donald Trump UK visit: protests, placards and putting Donald Trump and Theresa May attend a press conference AFP/Getty Donald Trump UK visit: protests, placards and putting Demonstrators protest against the visit of U.S. President Donald Trump REUTERS Donald Trump UK visit: protests, placards and putting Prime Minister Theresa May walks with US President Donald Trump at Chequers Getty Donald Trump UK visit: protests, placards and putting Donald Trump UK protest Angela Christofilou Donald Trump UK visit: protests, placards and putting First Lady, Melania Trump, tries her hand at bowls Getty Donald Trump UK visit: protests, placards and putting US President and British Prime Minister at Chequers Reuters Donald Trump UK visit: protests, placards and putting Demonstrator in Black Lives matter T-shirt Angela Christofilou Donald Trump UK visit: protests, placards and putting Theresa May and Donald Trump enter Chequers REUTERS Donald Trump UK visit: protests, placards and putting Protestors wearing Donald Trump and Theresa May paper mache heads join the protest in Butler's Cross PA Donald Trump UK visit: protests, placards and putting First Lady, Melania Trump, looks on as Philip May tries bowls Getty Images Donald Trump UK visit: protests, placards and putting American Psycho poster Angela Christofilou Donald Trump UK visit: protests, placards and putting First Lady, Melania Trump, reacts as she tries her hand at bowls Getty Donald Trump UK visit: protests, placards and putting Donald Trump protest in London Angela Christofilou Donald Trump UK visit: protests, placards and putting Theresa May, Donald Trump with US ambassador to the United Kingdom Woody Johnson and British Foreign Secretary Jeremy Hunt at the start of the bilateral meeting at Chequers EPA Donald Trump UK visit: protests, placards and putting Melania Trump and Philip May wave flags REUTERS Donald Trump UK visit: protests, placards and putting Donald Trump is greeted by Theresa May AP Donald Trump UK visit: protests, placards and putting The US First Lady Melania Trump, helps children to make poppies PA Donald Trump UK visit: protests, placards and putting The handshake between Donald Trump and Theresa May AP Donald Trump UK visit: protests, placards and putting Demonstrators raise a six meter high effigy of Donald Trump Getty Donald Trump UK visit: protests, placards and putting Donald Trump stands alongside Theresa May after he arrived for talks at Chequers, her country residence in Buckinghamshire PA Donald Trump UK visit: protests, placards and putting A six-meter high cartoon baby blimp of Donald Trump hovers next to the statue of former Prime Minister Winston Churchill AP Donald Trump UK visit: protests, placards and putting First Lady, Melania Trump, accompanied by Philip May, meets schoolchildren and British Army veterans Getty Donald Trump UK visit: protests, placards and putting A lookalike of former British Foreign Minister Boris Johnson stands next to a person in a cage wearing a money suit and a mask of Donald Trump AP Donald Trump UK visit: protests, placards and putting Donald Trump gestures as he prepares to board Marine One to depart the US ambassador's residence Winfield House AFP/Getty Donald Trump UK visit: protests, placards and putting Demonstrators stand in front of a blimp portraying US. President Donald Trump, in Parliament Square REUTERS Donald Trump UK visit: protests, placards and putting The Prime Minister hosts President Trump and First Lady Melania at a black tie dinner with business leaders at Blenheim Palace AFP/Getty Donald Trump UK visit: protests, placards and putting The Prime Minister, accompanied by husband Philip, arrive with President Trump and First Lady Melania to a black tie dinner with business leaders at Blenheim Palace AP Donald Trump UK visit: protests, placards and putting The Prime Minister and President Trump are seen holding hands, not for the first time EPA Donald Trump UK visit: protests, placards and putting President Donald Trump pumps his fist during his arrival, with first lady Melania Trump, in Regent's Park AP Donald Trump UK visit: protests, placards and putting Demonstrators bang pots and pans as they gather at the US ambassador residence in Regent's Park PA Donald Trump UK visit: protests, placards and putting US President Donald Trump and US First Lady Melania Trump walk in the grounds of the US ambassador's residence Winfield House AFP/Getty Donald Trump UK visit: protests, placards and putting A demonstrator protests next to the specially erected fence surrounding the US ambassador's residence REUTERS Donald Trump UK visit: protests, placards and putting A motorcade arrives at Winfield House in London, the residence of American Ambassador to the to the Court of St James's PA Donald Trump UK visit: protests, placards and putting A presidential helicopter lands in the grounds of the US ambassador residence in Regent's Park PA Donald Trump UK visit: protests, placards and putting Protesters chant and wave placards during a demonstration outside Winfield House Getty Donald Trump UK visit: protests, placards and putting he Marine One helicopter carrying US President Donald Trump and First Lady Melania Trump flies past the BT Tower Getty Donald Trump UK visit: protests, placards and putting Protesters chant and wave placards during a demonstration outside Winfield House Getty Donald Trump UK visit: protests, placards and putting US President Donald Trump and First Lady Melania Trump disembark from Air Force One after arriving in the UK Reuters Donald Trump UK visit: protests, placards and putting US First Lady Melania Trump and US President Donald Trump are greeted by US Ambassador to the United Kingdom Woody Johnson AFP Donald Trump UK visit: protests, placards and putting US President Trump and Melania Trump leaving Stansted Airport PA Donald Trump UK visit: protests, placards and putting An honour guard stands to receive US President Donald Trump and US First Lady Melania Trump AFP/Getty Donald Trump UK visit: protests, placards and putting Donald and Melania Getty Donald Trump UK visit: protests, placards and putting US President Donald Trump and First Lady Melania Trump greet Secretary of State for International Trade Liam Fox on their arrival Getty Donald Trump UK visit: protests, placards and putting US Marine Corps Osprey aircraft taking off PA Donald Trump UK visit: protests, placards and putting Us President Donald Trump and First Lady Melania Trump disembark from Air Force One AP Donald Trump UK visit: protests, placards and putting US President Trump and Melania Trump arrive at Stansted PA Donald Trump UK visit: protests, placards and putting A giant 'Human Rights Nightmare' banner is unfurled by Amnesty International activists across the river Thames on Vauxhall Bridge to protest against the visit of US President Donald Trump AP Donald Trump UK visit: protests, placards and putting US President Donald Trump waves as he arrives in the UK PA Donald Trump UK visit: protests, placards and putting An armed police officier waits on the tarmac at Stansted Airport AFP/Getty Donald Trump UK visit: protests, placards and putting US President Donald Trump and Melania Trump arrive at Stansted Airport PA Donald Trump UK visit: protests, placards and putting Armed police await the arrival of US President Donald Trump at Stansted Airport REUTERS

“The full cost of the operation is still being worked out but an early estimate is nearly £18 million.”

Ms Thornton said the presidential visit had come at a time when police forces across the country were already in “high demand”.

Officers were experiencing a large number of call-outs relating to the World Cup, hot weather, and various outdoor events and festivals.

“These demands affected local policing to differing degrees across the country with the host forces most impacted,” Ms Thornton added.

“The majority of forces had to cancel officers' rest days and extend the length of their shifts.

“Despite the challenges, the hard work of officers and staff made sure that the public were kept safe throughout.”

Making his first visit to the UK as president, Mr Trump held talks with prime minister Theresa May at Chequers and met the Queen at Windsor Castle, before travelling to Scotland where he played golf at his Turnberry resort.

However, the visit was met with large protests, including a demonstration in central London thought to have been attended by more than 100,000 people, while roughly 50,000 gathered in Edinburgh.

A six-metre tall “baby balloon”, a caricature of Mr Trump depicting him as orange-faced and dressed in a nappy, was flown over Parliament Square during the London protest following a crowdfunding campaign by organisers.

In Ayrshire, a man was charged by police for an alleged breach of a no-fly zone after a microlight dragging a banner reading “Trump well below par” flew within metres of the president during his time at Turnberry golf course.