Trump and Russia may have dominated the political discourse all summer, but last week the attention turned again to America’s internet technology giants. They had enjoyed a few months out of the spotlight following grueling congressional hearings in Washington late last year, after evidence emerged of Russia’s use of social media fake accounts to try to influence voters in the 2016 US presidential election.

But that respite ended last week after a tweet from Donald Trump that electrified the news agenda from Silicon Valley to the capital when, seemingly out of the blue – he posted a bizarre tweet. “Google search results for ‘Trump News’ shows only the viewing/reporting of Fake News Media. In other words, they have it RIGGED, for me & others, so that almost all stories & news is BAD,” he tweeted. Trump went on to allege that Google was censoring right-wing voices and privileging voices from the left.

The next day Trump doubled down, this time citing Twitter, Google and Facebook as being “unfair” to Republicans. “I think that Google and Facebook and Twitter ... treat conservatives and Republicans very unfairly. I think it’s a very serious problem because they’re really trying to silence a very large part of this country, and those people don’t want to be silenced.

“It’s not right. It’s not fair. It may not be legal, but we’ll see. We just want fairness.”

And Trump’s timing could not have been better. Next week, senior figures from those three companies come under scrutiny during a new set of high-profile hearings in Washington.

Suddenly, the political heat was back on big tech and this time, it’s experiencing double-trouble.

Up until now most criticism of the tech giants has come from the left, aggrieved at the ease with which Russians appeared to influence the election via bots and fake accounts spreading divisive propaganda. Additionally they have been accused of toxifying public debate, exploiting people’s data and building monopolies that are distorting the US economy.

But now the tech giants face a whole new political threat. And this time there is a growing volume of voices on the right from senior Republicans who are incensed about perceived bias against conservatives.

A reckoning may be coming and the companies lining up to defend themselves this week in Washington seem to be braced for some type of regulation. And, whilst Facebook’s Mark Zuckerberg has declared himself open to regulation, there’s some talk of the need to go further – to break up the companies using antitrust laws.

“The ultimate solution is really to find ways to limit the power of these companies through antitrust, to try to create the space for competitors to emerge,” says Franklin Foer, author of World Without Mind: the Existential Threat of Big Tech. “Because the real problem is that we have two or three chokeholds globally for the dissemination of information.

“We have two or three companies that are the masters of the global public sphere. That’s too much power to have invested in a small number of companies.”

Sheryl Sandberg, chief operating officer of Facebook and Jack Dorsey, CEO of Twitter, plus an as yet unnamed representative from Google, will appear in Congress to give evidence on Wednesday to a Senate intelligence committee examining the way Russia was able to manipulate American voters through their platforms.

Dorsey will go a second round in the afternoon, with the House energy and commerce committee demanding answers on Twitter’s use of algorithms and content moderation.

Republican Greg Walden, who chairs that committee, said he wants to “take complex, opaque algorithms out of the dark” and find out what systems Twitter has in place to prevent undue party political bias.

Trump, as only he can, increased the heat this week when he launched those attacks on Google, picking up conservative grievances about what they see as built-in bias and declaring a fringe conspiracy to be established fact.

By the end of the week, Trump was using an interview with Bloomberg to further raise the stakes, claiming “conservatives have been treated very unfairly” and said the companies may be in a “very antitrust situation”.

Foer, whose book is highly critical of the companies which have amassed power with little oversight, said: “When Trump raises the question about the internet and its power he manages to constantly make arguments that are bastardisations of good arguments.

There is a carelessness when it comes to Google, it dresses itself in scientific pretension about what it’s doing. Franklin Foer

“When he attacks Amazon and when he attacks Google, he is wrong in the specifics but he is spiritually correct.“

In other words, Google may not be inherently biased against conservatives, but when people search online for Trump, the algorithms will reward large media outlets over more fringe ones, partly because they are trusted, publish quickly and have large readerships.

“The problem with Google is that it’s biased against good results when it comes to a lot of questions – its algorithms are based on this whole cocktail of rationale that can often yield bad results,” Foer said.

“There is a carelessness sometimes when it comes to Google, it dresses itself in scientific pretension about what it’s doing, that its results are derived from maths, and that’s true, but its goal is to keep people engaged on its site for as long as possible.”

Google defended itself against Trump’s claims of bias, issuing a statement insisting: “Search is not used to set a political agenda and we don’t bias our results toward any political ideology.”

Academic Tarleton Gillespie, author of Custodians of the Internet, who works for Microsoft Research and Cornell University, wrote in detail this week on Medium about the nature of search engines, saying of Trump’s attack “it is potent, and it’s almost certainly wrong”.

But he added, Trump’s attack came at a moment when deeper questions are being asked “about free speech, news, and how platforms subtly reshape public participation”.

Even as Trump complains, he benefits far more than most from the amplification of social media. As Kara Swisher wrote in the New York Times this week: “Trump himself is the most voluble politician ever to use digital media, and his entire existence has been amplified, echoed and re-echoed over and over again by the tools that Silicon Valley has let loose on the world over the past two decades.”

Trump appears to have short-term politics in mind – casting Google as a new enemy rigging the system against him is a useful way to anger his loyal base and get them out to vote in November’s midterms.

But the drumbeat for regulation of the tech companies is growing – and the understated Democratic Senator Mark Warner may pose a bigger threat to them than the obvious danger of a noisy skirmish with the president.

Warner, the senior Democrat on Wednesday morning’s committee, has produced a white paper of potential policy proposals for regulation of social media and technology firms, which said “each of them deserves enormous recognition” for changing the world in positive ways, but warns “these tech giants now also deserve increased scrutiny”.

He says the companies were caught repeatedly flat-footed by Russia’s interference in the 2016 presidential election and wrote: “The speed with which these products have grown and come to dominate nearly every aspect of our social, political and economic lives has in many ways obscured the shortcomings of their creators in anticipating the harmful effects of their use.”

Warner’s proposals include policies to deal with fake and anonymous accounts. Tech companies could be made liable for defamation on their platforms, he proposes. The source of political adverts should be disclosed to stop foreign adversaries threatening democracy. Service providers could also be placed under a legal duty to protect users’ data.

The European Union has already introduced general data protection regulation to safeguard consumers so their data cannot be shared without their consent.

California has also just passed the Consumer Privacy Act, which would give consumers more control over their personal information – including the ability to have data deleted and prevent it being sold to advertisers and others.

Foer believes the California model – due to come into effect on 1 January 2020 – is the most likely route for Congress to follow nationally, although he predicts companies will try to shape and water down any federal law.

“I’m of the school that clearly we need some sort of privacy regulation, we need some data protection laws, that is screamingly obvious, it’s gobsmacking that we don’t have one,” he said.

“But I’m extremely reluctant to impose regulation either on algorithms or the way that they operate, because we see what’s happening in China. It doesn’t require any imagination to figure out how a person like Donald Trump would be able to exploit regulations for his own good.”