Facebook (FB) CEO and co-founder Mark Zuckerberg testified on Tuesday before the Senate Judiciary and Commerce Committees — a charged, five-hour hearing that saw senators at times lob criticism at Zuckerberg while grilling him on the recent Cambridge Analytica scandal, the company’s role in the 2016 U.S. presidential election, and its position on government regulation regarding user privacy.

But it would appear that Zuckerberg prevailed on the first day of Congressional hearings, at least among investors who reacted favorably to what Zuckerberg said. Facebook stock was up 4.5% to $165.04 per share when the markets closed prior to the end of the hearing.

“If you and other social media companies don’t get your act together, none of us are going to have privacy anymore, ” Sen. Bill Nelson, the senior senator from Florida, remarked to Zuckerberg before the Facebook chief executive’s opening remarks.

At the start, an apologetic Zuckerberg stuck closely to his prepared remarks, which were releasedMonday.

“Just recently, we’ve seen the #metoo movement and the March for Our Lives, organized, at least in part, on Facebook. After Hurricane Harvey, people raised more than $20 million for relief,” Zuckerberg said in his prepared opening remarks. “And more than 70 million small businesses now use Facebook to grow and create jobs. But it’s clear now that we didn’t do enough to prevent these tools from being used for harm as well. That goes for fake news, foreign interference in elections, and hate speech, as well as developers and data privacy. We didn’t take a broad enough view of our responsibility, and that was a big mistake. It was my mistake, and I’m sorry. I started Facebook, I run it, and I’m responsible for what happens here.”

During the Senate Judiciary and Commerce Committees’ Q&A, Zuckerberg emphasized his goal of informing users about the different ways in which in their data could be used. He also discussed the challenges of balancing being explicit with privacy policies with making those same policies simple and accessible enough for users to understand.

Zuckerberg also discussed how much Facebook has evolved since he started the social network from his Harvard University dorm room in 2004. Back then, when Facebook was an exclusive, college-only social network, policing content was a matter of having Facebook users flag content to be taken down. Flash-forward 14 years, however, and Zuckerberg acknowledged such methods simply aren’t enough. In particular, Zuckerberg clarified that Facebook should have banned Cambridge Analytica earlier than they did, given its role as an advertiser in 2015, adding that Facebook made a mistake in not doing so.

“What I think we’ve learned now … is that we need to take a proactive broader role,” Zuckerberg explained. We need to take a more proactive role in policing the ecosystem and making sure members of the community are using the ecosystem in a way that is healthy.”

Zuckerberg explained some of the measures Facebook is taking to thwart future activity from bad actors. The social network is using artificial intelligence, for instance, to identify classes of bad activity and flag it to Facebook, and by the end of 2018, Facebook will employ over 20,000 people focused on security and reviewing content.

“Some problems lend themselves more easily to AI solutions than others,” said Zuckerberg. “99% of the terrorist content on our site — our systems flag before humans see it.”

Zuckerberg also weathered some critical comments. Sen. Maria Cantwell, the junior United States senator from Washington, made some pointed remarks that questioned Zuckerberg’s character.

“I believe you have the talent,” Cantwell explained. “I want to know if you have the will to help us.”

Meanwhile, Sen. John Kennedy from Louisiana did not mince words regarding what he felt was Facebook’s lengthy user agreement language.

“Your user agreement sucks,” Kennedy contended. “The purpose is to protect Facebook’s rear end — not to protect users’ rights. I’m going to suggest that you go back and rewrite it. Tell them to rewrite it in non-Swahili.”

Sen. Amy Klobuchar, senior senator from Minnesota asked whether Zuckerberg would support a rule requiring companies to notify users about a data breach within 72 hours of the breach occurring.

“Senator, that makes sense to me,” Zuckerberg said simply. “I’ll have my team get back to you on that.”

“There’s a common misperception about Facebook that we sell data to advertisers,” Zuckerberg added. “We allow advertisers to tell us who we want to reach, and then we handle the placement.”

Zuckerberg’s two-day appearance follows a number of media appearances and press calls where he apologized and admitted mistakes in the Cambridge Analytica scandal, which involved the improper release of personal information of as many as 87 million users to the political consultant. The admission contrasts his previous response to the manipulation of Facebook’s platform for political purposes during the 2016 elections. At that time, Zuckerberg denied that Facebook was helping to deliver “fake news.” Now that Zuckerberg is addressing that there is a problem and even outlined steps that Facebook is taking to protect user data, the company may be able to make it through this rough patch.

All of which begged the question that remains on virtually everyone’s minds: Is government regulation for companies like Facebook an inevitability, and is Facebook truly open to it?

“Our position is not that regulation is bad,” Zuckerberg summed up towards the end of the hearing on Tuesday. “I think the real question is what is the right framework for this — not whether there is one.”

—

JP Mangalindan is the Chief Tech Correspondent for Yahoo Finance covering the intersection of tech and business. Email story tips and musings to jpm@oath.com. Follow him on Twitter or Facebook.