Updated

London Mayor Sadiq Khan shared death threats he’s received on Twitter during a South by Southwest (SXSW) keynote speech in which he called for technology companies and governments to safeguard citizens from hate speech, disinformation and the tech-driven negative impact of globalization.

During a time of what Khan called “historic change and uncertainty,” the tech sector as a whole must take a greater share of responsibility for curtailing hate speech and extremism, increasing the diversity of its own ranks and minimizing the negative effects of its products on communities.

“No business or industry should ever consider itself above the local rules or laws set by democratic processes,” Khan, who is London’s first Muslim mayor, told a packed auditorium in Austin, Texas.

SADIQ KHAN: 'DERELICTION OF DUTY' BY POLICYMAKERS FOR FAILING TO REGULATE BIG TECH

Examples of the tweets that Khan read aloud include:

Muslims have no dignity. I wish Sadiq Khan would just blow himself up like they all do. He might get his 12 virgins.

I'd pay for someone to execute Sadiq Khan, funnily enough.

facebook london

The headquarters of Facebook is seen above in London. (Reuters)

Deport all muslims and make london white again, all problems will be gone

During a sit-down the Huffington Post Editor-in-Chief Lydia Polgreen after the speech, Khan said he didn’t share the tweets to call attention to his own harassment, though he called it “distressing.”

Companies and users alike have a responsibility to not only show solidarity with victims of harassment but also to take action.

“We know that there is technology that exists, algorithms that can be designed to spot this stuff,” said Khan. “This is not about depriving people of free speech, this is about inciting hatred, this is about things that divide our communities.”

However, the tech and business-friendly British mayor took aim at governments and fellow progressives for failing to alleviate the economic pain of communities left behind by globalization’s reach as a wave of nationalistic populism continues to spread in Europe and the U.S.

SXSW: SCIENTISTS TOUT 'PEN' TECHNOLOGY THAT DETECTS CANCER IN 20 SECONDS

“We have to train them up to have the skills for the jobs of tomorrow. We’ve got to make sure that traditional sectors understand they have to innovate and we have to train up people, re-train people in traditional sectors,” Khan said.

The London mayor also took a veiled swipe at the Clinton brand of liberalism and at President Trump.

“This idea of triangulation, I think that was a mistake for progressives,” said Khan. “Rather than addressing peoples’ fears, individuals are playing on them to win elections.”

According to Khan, if you are unhappy about a lack of healthcare or poor housing options, it’s not the fault of immigrants but a failure of governments to invest in better healthcare, affordable housing and better schools.

“We’ve got to explain that in a proper way. What we did in the last 10 to 30 years is assume that everyone would enjoy the fruits of globalization,” Khan told Polgreen.

A similar situation to what happened in America’s “Rust Belt” has played out in Great Britain, where many of the people who voted to leave the European Union did so out of a deep sense of disillusionment with the impact of globalization.

In terms of the tech sector, Khan said he was hopeful that companies like Google, Facebook and Twitter will make the necessary adjustments moving forward.

“Unless they evolve and adapt and take steps, then don’t be surprised if governments go down the German route,” he added.