Two bills meant to protect children and teens from online exploitation were passed in a bipartisan vote in the Senate on Tuesday.

The bills, titled the Kids Online Safety Act (KOSA) and the Children and Teens’ Online Privacy Protection Act (COPPA 2.0), passed the Senate in an overwhelming 91-3 vote on July 30.

KOSA imposes a “duty of care” on social media companies, holding them legally liable if they are negligent in their efforts to prevent children from accessing harmful material.

Bullying and harassment, as well as sexual and violent material, are listed as harmful material covered by the legislation. The bill would also require platforms to work to prevent children from accessing material that could contribute to anxiety, depression, eating disorders, and various other harm.

The bill would require social media platforms to allow children to opt out of algorithmic recommendations and give parents control over how platforms can use their children’s information. It would also require independent audits of the platforms.

COPPA 2.0 prohibits companies from gathering data without consent on minors under 16. It would also ban targeted advertising for children and create a “Digital Marketing Bill of Rights for Teens” to restrict data collected on teenagers.

Proponents of the measures say the bills will protect minors from harmful content and exploitation and enable parents to have greater control of their children’s online safety.

Sen. Marsha Blackburn, a Tennessee Republican and one of KOSA’s original backers, called the bill’s passage a “major step forward in protecting children online.”

“The 91 senators from across the political spectrum that stood up to Big Tech and voted in favor of this legislation have helped save countless innocent lives from being exploited online,” she said.

Though receiving nearly universal approval in the Senate, the measures received criticism from some, such as Kentucky Republican Sen. Rand Paul.

In an opinion piece in the Courier-Journal, Paul claimed that KOSA will “stifle free speech” and “deprive Americans of the benefits of our technological advancements.”

According to Paul, the bill is opposed by groups on both the left and right ranging from Students for Life to the ACLU.

“This bill does not merely regulate the internet; it threatens to suppress important and diverse discussions that are essential to a free and healthy society,” Paul wrote, concluding that “free minds and parental guidance are the best means to protect our children online.”

The other two senators to vote against the measures were Sen. Mike Lee, R-Utah, and Sen. Ron Wyden, D-Oregon.

Having received final approval from the Senate, the bills will now be sent to the House for consideration.