WASHINGTON - Under fire from President Donald Trump and his allies, the CEOs of Twitter, Facebook and Google rebuffed accusations of anti-conservative bias at a Senate hearing Wednesday and promised to aggressively defend their platforms from being used to sow chaos in next week's election.

Lawmakers of both parties, eyeing the companies' tremendous power to disseminate speech and ideas, are looking to challenge their long-enjoyed bedrock legal protections for online speech - the stated topic for the hearing but one that was quickly overtaken by questions related to the presidential campaign.

With worries over election security growing, senators on the Commerce Committee extracted promises from Twitter's Jack Dorsey, Facebook's Mark Zuckerberg and Google's Sundar Pichai that their companies will be on guard against meddling by foreign actors or the incitement of violence around the election results.

Testifying via video, the executives said they are taking several steps, including partnerships with news organizations, to distribute accurate information about voting. Dorsey said Twitter was working closely with state election officials.

“We want to give people using the service as much information as possible,” he said.

Republicans, led by Trump, have accused the social media platforms, without evidence, of deliberately suppressing conservative, religious and anti-abortion views, and they say that behaviour has reached new heights in the contest between the president and Democratic nominee Joe Biden.

Sen. Roger Wicker, R-Miss., the committee's chairman, said at the start of the hearing that the laws governing online speech must be updated because “the openness and freedom of the internet are under attack.”

Wicker cited the move this month by Facebook and Twitter to limit dissemination of an unverified political story from the conservative-leaning New York Post about Biden. The story, which was not confirmed by other publications, cited unverified emails from Biden's son Hunter that were reportedly disclosed by Trump allies.

“Twitter's conduct has by far been the most egregious,” Sen. Ted Cruz, R-Texas, told Dorsey. Cruz cited Twitter's limitations on the newspaper story as part of “a pattern of censorship and silencing Americans with whom Twitter disagrees.”

“Who the hell elected you? And put you in charge of what the media are allowed to report?” Cruz asked.

Dorsey told Cruz that he does not believe that Twitter can influence elections because it's only one source of information. He tried to steer senators away from conventional notions of political bias, noting that “much of the content people see today is determined by algorithms.” He endorsed a proposal from computer scientist Stephen Wolfram that would allow third parties to guide how artificial intelligence systems choose what postings people see.

GOP senators raised with the executives an array of allegations of other bias on the platforms regarding Iran, China and Holocaust denial.

There's no evidence that the social media giants are biased against conservative news, posts or other material, or that they favour one side of political debate over another, researchers have found. But Republicans aren't alone in raising concerns about the companies' policies.

Democrats focused their criticism mainly on hate speech, misinformation and other content that can incite violence, keep people from voting or spread falsehoods about the coronavirus. They criticized the tech CEOs for failing to police content, blaming the platforms for playing a role in hate crimes and the rise of white nationalism in the U.S.

Amid the debate, the Trump administration has asked Congress to strip some of the protections that have generally shielded the tech companies from legal responsibility for what people post on their platforms. The proposals would make changes to a provision of a 1996 law that has been the foundation for unfettered speech on the internet. Critics in both parties say that immunity under Section 230 of the law enables the social media companies to abdicate their responsibility to impartially moderate content.

Trump chimed in Wednesday with a tweet exhorting, “Repeal Section 230!”

The CEOs argued that the liability shield has helped make the internet what it is today, though Zuckerberg said he believes that Congress “should update the law to make sure it's working as intended.” Dorsey and Pichai urged caution in making any changes.

But the executives also rejected accusations of bias. “We approach our work without political bias, full stop,” Pichai said. “To do otherwise would be contrary to both our business interests and our mission.”

The companies in recent years have wrestled with how strongly to intervene with speech. They have often gone out of their way not to appear biased against conservative views - a posture that some say effectively tilts them toward those viewpoints. The effort has been especially strained for Facebook, which was caught off guard in 2016, when it was used as a conduit by Russian agents to spread misinformation benefiting Trump's presidential campaign.

Wednesday's session lacked the in-person drama of star-witness proceedings before the coronavirus outbreak. The hearing room was nearly empty except for Wicker and a few colleagues, as most senators took part remotely, but their questioning was sharp as tempers flared among members.

Sen. Brian Schatz, D-Hawaii, went after Republicans, saying the hearing was a “sham.” With their questions, Schatz said, the Republicans “are trying to bully the heads of private companies into making a hit job” on political leaders.

All three companies have scrambled to stem the tide of material that incites violence and spreads lies and baseless conspiracy theories. In their efforts to police misinformation about the election, Twitter and Facebook have imposed a misinformation label on some content from the president, who has about 80 million followers.

Trump has refused to publicly commit to accepting the results if he loses the presidential contest. He also has raised the baseless prospect of mass fraud in the vote-by-mail process. None of the five states that mail ballots to all voters has seen significant cases of fraud.

Starting Tuesday, Facebook isn't accepting any new political advertising. Previously booked political ads will be able to run until the polls close Nov. 3, when all political advertising will temporarily be banned. Google, which owns YouTube, also is halting political ads after the polls close. Twitter banned all political ads last year.

AP Technology Writers Matt O'Brien in Providence, Rhode Island, and Barbara Ortutay in Oakland, California, contributed to this report.