On Friday, Facebook announced stronger guidelines for transparency in advertising on the social network, part of a campaign to forestall government regulation. “We’re going to make advertising more transparent, and not just for political ads,” Rob Goldman, Facebook’s vice president of ads, said in a blog post.

The new rules included two key elements: A searchable archive of political ads related to federal elections, and demographic information, including location and gender, of the people shown such ads. Both appear to have been added by Facebook in the days before the Friday announcement, after earlier versions of its proposed transparency measures received a chilly reception on Capitol Hill, according to people familiar with the talks. In proposals Facebook shared earlier last week, “The ads were still not publicly accessible or searchable and Facebook was still not providing any information related to the targeting for ads,” said one of those people.

The incident dramatizes how Silicon Valley giants are scrambling to head off new regulations from Washington following revelations about how Russia used their tools to meddle in the 2016 US election. Twitter, for example, last week announced new rules that will allow users to see how long an ad has been running, the content of other ads by that advertiser, and which ads have been targeted at them. Executives from Facebook, Google, and Twitter are scheduled to appear Tuesday and Wednesday at congressional hearings examining the election and its aftermath.

Elisabeth Diana, Facebook’s corporate communications director, says the company always intended to allow users to view all political ads, but “made some tweaks” to its policies following talks with industry partners, congressional offices, Twitter, and the Interactive Advertising Bureau. “We went to the Hill proposing some things and they gave us feedback. We’ll keep talking to the Hill and keep talking to our partners,” says Diana, stressing that Facebook will reevaluate its rules based on its pilot test in Canada.

Diana declined to comment on whether Congress requested drastic changes from Facebook. “The two foundational elements of what we announced [on Friday] were transparency and authenticity,” says Diana. “Those two things we laid out almost a month ago and we are delivering on those.”

Facebook is not the only company to respond to criticism from Washington. Twitter’s moves last week, which are more sweeping than Facebook’s, followed criticism of Twitter’s initial response to reports of Russian meddling.