Sadiq Khan has been accused of "courting trouble" over Donald Trump's impending state visit to the UK for saying the US President should expect "loud protests" on his arrival.

At Mayor's Question Time today, the Ukip representative for the London Assembly, David Kurten, said Trump was a "good president" whose visit to the UK in July would open up opportunities for trade.

"The concern people have over the words you have said as mayor, and as police and crime commissioner, in talking about 'loud' protests is that they could be seen to be encouraging protests which may be unruly to the president when he comes," he said.

"Don't you think you should have been more responsible in your choice of words?"

Last month Khan said at a St George's Day event in Trafalgar Square that London had a "great history in our city of protests" but warned that any in response to Trump's visit should be lawful and peaceful.

"I have no doubt that if he does come, there will be some people who want to express their views loudly and peacefully to the president," he said.

The controversial issue of Trump's visit was raised by a question over the president's security, to which the mayor replied there may be "one or two protests" to rumbles of laughter.

Kurten said Khan had "singled out" Trump for criticism while not airing any concerns over the visit of the Crown Prince of Saudi Arabia, Mohammed bin Salman, in March despite the kingdom's policies on women, freedom of speech and freedom of religion.

Khan replied: "The difference is that we have special relationship with the US – they are our best friends. We don't have the same relationship with other countries.

"One of the responsibilities of a best friend is to stand shoulder to shoulder in times of adversity but also to call them out when they are wrong. I appreciate some people like to be sycophants all the time; I believe it is important to call out your friend when they are wrong. I believe it is wrong to amplify tweets of Britain First and I l believe it is out of order amplifying racist tweets that divide our society."

Trump was originally due to visit the UK in February to open the US embassy in London, but he claimed to have cancelled the trip because of Nine Elms' "off location" and the poor property deal.

However, it is thought he was concerned about protests, which have already put off plans for a procession up the Mall and a state banquet.