London Mayor Sadiq Khan compared President Donald Trump to the fascists who roiled Europe in the 20th century in an opinion article published ahead of the U.S. president's state visit to the United Kingdom that begins Monday.

"In years to come, I suspect this state visit will be one we look back on with profound regret and acknowledge that we were on the wrong side of history," Khan wrote in the article published by The Guardian.

Khan cited Trump's remarks following the August 2017 attack in Charlottesville, Va., his administration's family separation immigration policy, as well as his recent backing of former British foreign secretary Boris Johnson for prime minister "because he believes it would enable him to gain an ally in Number 10 for his divisive agenda."

Trump and Khan have had a contentious relationship for years. After attackers killed eight people near the London Bridge in 2017, Trump criticized Khan's handling of the incident, and Khan's office called Trump "ill-informed."

"Donald Trump is just one of the most egregious examples of a growing global threat," Khan wrote in the article, which was published online with the headline "It's un-British to roll out the red carpet for Donald Trump."

Khan wrote that Trump was part of the global rise of the "far right" that threatened "our hard-won rights and freedoms and the values that have defined our liberal, democratic societies for more than seventy years."

"Viktor Orbán in Hungary, Matteo Salvini in Italy, Marine Le Pen in France and Nigel Farage here in the UK are using the same divisive tropes of the fascists of the 20th century to garner support, but are using new sinister methods to deliver their message," he wrote.

The White House did not respond to a request for comment.

The president's three-day visit to the United Kingdom this week marks his first official state visit to the country, though he did travel to the country last year for a working visit in which he met Queen Elizabeth II.

Trump is scheduled to meet with more members of the royal family in the upcoming visit, including Charles, Prince of Wales, his wife Camilla, the Duchess of Cornwall and Prince Andrew, the Duke of York.