Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

LONDON — The British government delivered a rare rebuke of President Donald Trump on Wednesday for retweeting inflammatory anti-Muslim and anti-immigrant videos originally shared by a far-right U.K. political group.

Trump shared three videos posted by Jayda Fransen, deputy leader of the fringe group Britain First, which opposes what it calls the "Islamization" of Britain and has engaged in a series of stunts, including occupying mosques.

"It is wrong for the president to have done this," Prime Minister Theresa May said in a statement.

Trump responded to the British leader on Wednesday evening with a heated tweet saying "Theresa @theresamay, don’t focus on me, focus on the destructive Radical Islamic Terrorism that is taking place within the United Kingdom. We are doing just fine!" — but mistakenly directed that to an unrelated Twitter account.

He later deleted that post and replaced it with a similarly worded tweet, but with May's correct handle.

.@Theresa_May, don’t focus on me, focus on the destructive Radical Islamic Terrorism that is taking place within the United Kingdom. We are doing just fine! — Donald J. Trump (@realDonaldTrump) November 30, 2017

The first video Trump shared claimed to show a Muslim migrant beating up a Dutch boy on crutches. The second was captioned “Muslim destroys a statute of Virgin Mary,” and the third read “Islamist mob pushes teenage boy off roof and beats him to death!”

NBC News could not verify Britain First's claims of what the videos showed. Asked whether the White House has a responsibility to verify information before sharing it, Press Secretary Sarah Sanders responded that “whether it’s a real video, the threat is real and that’s what the president is talking about.”

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

The Dutch Embassy in the U.S. said that the group's description of the first video was inaccurate and that the perpetrator was born and raised in the Netherlands. "Facts do matter," they said on Twitter.

Fransen thanked Trump for sharing the videos with his "44 MILLION FOLLOWERS!"

"GOD BLESS YOU TRUMP! GOD BLESS AMERICA!" she tweeted.

The husband of a British lawmaker who was killed by a far-right nationalist in 2016 slammed Trump for trying to legitimize right-wing extremists in the U.K.

"Trump has legitimized the far-right in his own country, now he's trying to do it in ours," tweeted Brendan Cox, whose wife, Jo, was shot and stabbed last year in her constituency by a man who witnesses said shouted "Britain First."

"Spreading hatred has consequences, and the president should be ashamed of himself," Cox added.

Britain First — which has run candidates in local and national elections with little success, and campaigned against the construction and expansion of mosques — denied involvement in the attack on Jo Cox.

In a statement, the prime minister said Britain First sought to "divide communities in their use of hateful narratives which pedal lies and stoke tensions."

"This causes anxieties to law abiding people," May said. "The British people overwhelmingly reject the prejudice rhetoric of the far-right, which is the antithesis of the values that this country represents; decency, tolerance and respect."

The invitation for Trump to visit the U.K. next year was still in place, however, according to May's office.

Several British opposition lawmakers criticized Trump and called on the U.K. government to rescind the invitation.

“The U.S. president is normalizing hatred. If we don’t call this out, we are going down a very dangerous road,” tweeted Labour Party politician Chuka Umunna. “His invite to visit the U.K. in 2018 should be immediately withdrawn.”

Trump sharing Britain First. Let that sink in. The President of the United States is promoting a fascist, racist, extremist hate group whose leaders have been arrested and convicted. He is no ally or friend of ours. @realDonaldTrump you are not welcome in my country and my city. — David Lammy (@DavidLammy) November 29, 2017

London's Mayor Sadiq Khan also hit back at Britain First, calling it in a statement "a vile, hate-fueled organization whose views should be condemned, not amplified."

Trump criticized Khan for his reaction to the June 3 London Bridge terror attack. Khan has also called for the cancellation of a state visit by Trump.

Britain First has a significant presence on social media with over 24,000 followers on Twitter and well over a million likes on Facebook. In past years it has staged a number of demonstrations around Britain that usually attract a few hundred protesters.

In September, the leaders of the organization, including Fransen, were charged with causing religiously aggravated harassment by disseminating leaflets and sharing online videos.