Lawmakers on Wednesday warned at a hearing featuring executives from three technology giants that they are considering stricter regulations on social-media platforms, expressing deep concern about the tech companies’ failures at preventing foreign actors from using such platforms to amplify political tensions during the 2016 election and beyond.

Officials from Facebook Inc., Alphabet Inc.’s Google and Twitter Inc. appeared on Capitol Hill on Wednesday for a second day of grilling from members of Congress, answering nearly six hours of pointed questions over the course of two back-to-back appearances before the House and Senate intelligence committees. Company executives faced sometimes hostile inquiries about the role that Russia played on social media both before and after last year’s presidential campaign. In addition, the questions raised went well beyond the election and touched on core aspects of the companies’ business models, including their long-held stance that they are merely platforms hosting content produced by others and not media companies in and of themselves.

“I’ve been very proud to represent this tech community from California, but I must say, I don’t think you get it,” said Sen. Dianne Feinstein, a Democrat from the San Francisco Bay Area, the heart of the U.S. tech industry. “You’ve created these platforms, and now they are being misused, and you have to be the ones to do something about it. Or we will.” The companies were scheduled for back-to-back appearances Wednesday in front of both the House and Senate intelligence committees, following an appearance before the Senate Judiciary Committee on Tuesday. All three panels are investigating matters stemming from Russian activity during the election.

Tech companies—which for years have been only lightly regulated by Washington policy makers concerned about stifling innovation—faced the threat of new regulations, particularly on social-media services, from members of Congress who expressed concern about foreign government influence campaigns, terrorist propaganda, and suppression of speech and information by authoritarian governments around the world. “I think this has risen to a level of a national security issue,” said Rep. Terri Sewell, an Alabama Democrat. “While you are self-policing yourself, and that’s great, I really do believe that we have an obligation to the American people to do more than just that.” “There seems to be some legislation that needs to be had here,” she added. Both committees also released more than a dozen examples of the kind of content that Russian-linked Facebook pages ran. The Senate and House Intelligence Committee released the names of new accounts associated with Russia, such as “Army of Jesus” and “Woke Blacks.” Other examples that were featured included content that lawmakers said was designed to inflame U.S. political opinion.

Executives from the tech companies also used the public hearing as a chance to ask the U.S. government for more support in sharing information from its intelligence community to investigate foreign actors. “Where we really see a role for government in assisting in this effort is to ensure that we are all sharing information about the techniques and threat actors that we need to be alert to and monitoring,” Facebook’s Mr. Stretch said during the House hearing. The committee hearings also offered new details on the potential scope of the Russian activity on its platforms. Facebook offered new details on Kremlin-backed activity on Instagram, a popular photo-sharing platform that it acquired in 2012. Russian-created posts reached an estimated 20 million people on Instagram, including 16 million after Oct. 2016. This is on top of the 126 million reached by 80,000 organic posts churned out by Russian-backed accounts on Facebook, bringing the total to 146 million people reached.