Citing fears that doctored videos of political candidates could be used to manipulate voters in 2020, a California lawmaker has proposed legislation to ban the release of so-called deepfake images before an election.

Assemblyman Marc Berman, D-Palo Alto, introduced AB730, which would prohibit a person from knowingly distributing a video or photo 60 days before an election with the intent of misleading voters with an image that has been deceptively edited to make it look like a true depiction of the candidate’s words or behavior.

Berman unveiled the legislation Monday, saying that the proliferation of deepfake technology — fictitious images created using artificial intelligence that appear realistic — could be weaponized on a mass scale.

The bill would apply to those advanced images, as well as more crudely edited videos designed to misportray candidates’ words. Berman said that would apply to cases such as the viral Facebook video that was slowed to make House Speaker Nancy Pelosi appear drunk or otherwise impaired during a speech last month.

“We need to try to get ahead of this, as opposed to reacting to it after millions of people have been unduly influenced by images that have been manipulated,” he said. “Hopefully, we learned our lesson from 2016.”

The lawmaker said deceptive social media postings in the 2016 election, which federal intelligence agencies say were planted by Russian operatives, show the looming threat posed by deceptive video.

The bill would create a new civil cause of action, allowing voters to sue to stop the spread of fake videos and pictures. People who spread falsely edited images to knowingly manipulate elections could be sued for damages.

The bill contains a big caveat: Deceptive video, photos and audio would still be allowed, as long as it contains a prominent disclosure stating that the media has been manipulated.

Another exception shields media outlets, including television stations, publications and websites, if they disseminate the false images for the “purpose of disseminating newsworthy facts” and state that it doesn’t accurately represent a candidate’s conduct.

The bill was introduced as an amendment to an unrelated measure Berman proposed dealing with confidentiality of voter information. The new proposal guts his earlier bill and uses its shell number.

The new proposal hasn’t drawn vocal opposition, so far. A spokeswoman for the American Civil Liberties Union of California said the organization is “still reviewing the bill to make sure it doesn’t intrude on free speech rights.”

Dustin Gardiner is a San Francisco Chronicle staff writer. Email: dustin.gardiner@sfchronicle.com Twitter: @dustingardiner