SACRAMENTO, Calif. — California Gov. Gavin Newsom signed three bills Tuesday to crack down on the use of artificial intelligence to create false images or videos in political ads ahead of the 2024 election.

A new law, set to take effect immediately, makes it illegal to create and publish deepfakes related to elections 120 days before Election Day and 60 days thereafter. It also allows courts to stop distribution of the materials and impose civil penalties.

“Safeguarding the integrity of elections is essential to democracy, and it’s critical that we ensure AI is not deployed to undermine the public’s trust through disinformation — especially in today’s fraught political climate,” Newsom said in a statement.

Large social media platforms are also required to remove the deceptive material under a first-in-the-nation law set to be enacted next year. Newsom also signed a bill requiring political campaigns to publicly disclose if they are running ads with materials altered by AI.

The governor signed the bills to loud applause during a conversation with Salesforce CEO Marc Benioff at an event hosted the major software company during its annual conference in San Francisco.

The new laws reaffirm California’s position as a leader in regulating AI in the U.S., especially in combating election deepfakes. In 2019 the state was the first to ban manipulated videos and pictures related to elections. Measures in technology and AI proposed by California lawmakers have been used as blueprints for legislators across the country, industry experts said.

With AI supercharging the threat of election disinformation worldwide, lawmakers across the country have raced to address the issue over concerns the manipulated materials could erode the public’s trust in what they see and hear.

“With fewer than 50 days until the general election, there is an urgent need to protect against misleading, digitally-altered content that can interfere with the election,” Assemblymember Gail Pellerin, author of the law banning election deepfakes, said in a statement. “California is taking a stand against the manipulative use of deepfake technology to deceive voters.”

Newsom’s decision followed his vow in July to crack down on election deepfakes in response to a video posted by X-owner Elon Musk featuring altered images of Vice President Kamala Harris, the Democratic presidential nominee.

The new California laws come on the same day members of Congress unveiled federal legislation aiming to stop election deepfakes. The bill would give the Federal Election Commission the power to regulate the use of AI in elections in the same way it has regulated other political misrepresentation for decades. The FEC has started to consider such regulations after outlawing AI-generated robocalls aimed to discourage voters in February.

Newsom also signed two other bills Tuesday to protect Hollywood performers from unauthorized AI use without their consent.