Prime Minister David Cameron said Sadiq Khan was “a proud Muslim and a proud Brit” during an anti-Brexit event just weeks after attacking the London mayor for having alleged links to Islamic extremists.

Cameron made the remarks during the launch of the “Britain Stronger in Europe” rally at Roehampton University in West London.

Sharing a platform with Sadiq Khan, Cameron attempted to show solidarity with the London mayor just weeks after being accused of participating in an Islamophobic campaign against him during the mayoral race.

The utter shamelessness of David Cameron - at the absolute centre of a bigoted campaign against Sadiq Khan - now praising him

The prime minister had linked Khan with violent extremists “again and again and again.”

At the time, Cameron said the former Tooting MP had appeared on a platform with Muslim community leader Suliman Gani, who the prime minister falsely accused of supporting Islamic State (IS, formerly ISIS/ISIL).

Gani, as it turned out, is a Conservative backer who had even been invited to Tory events. The Muslim community leader called for an apology, accusing Cameron of “defamation of the highest level.”

During the mayoral race, Sadiq Khan was the victim of attacks that Muslim groups said reached “disturbing lows,” when his Conservative rival, Zac Goldsmith, allegedly exploited racial tensions in an Islamophobic campaign.

The prime minister also denied the accusations of pro-Brexit supporters claiming that anti-Brexit warnings predicting the economic downfall of the UK should it citizens choose to leave the EU were “part of some massive establishment conspiracy.”

“Sadiq and I say it for this reason: because we love our country, we want our country to be the best we possibly can, to be the strongest, to be the greatest,” Cameron said.

The “Vote Leave” campaign was swift to respond to the event, with UKIP MP Douglas Carswell saying the prime minister “cannot be trusted.”

“Just a month ago, he attacked Sadiq Khan as a terrorist sympathizer, yet today he hailed him as a great politician as he stood next to him on a shared platform,” Carswell said, according to the Independent.

Standing beside Cameron, London’s mayor said he would work closely with the Conservative government.

“The reason why London is the greatest city in the world – and it is, we have never taken an isolationist approach, we are open-minded, we are outward-looking, we embrace other cultures and learn from other cultures and ideas as well,” Khan said.

The UK is due to hold a referendum on whether to stay in European Union on June 23.