FILE -- In this Aug. 31, 2016 file photo Assemblyman Rob Bonta, D-Alameda, speaks during a legislative session, in Sacramento, Calif. The Assembly approved Bonta's measure, AB22 that would prevent California state employees from being fired for being a member of the Communist Party. The bill now goes to the Senate. (AP Photo/Rich Pedroncelli)

FILE -- In this Aug. 31, 2016 file photo Assemblyman Rob Bonta, D-Alameda, speaks during a legislative session, in Sacramento, Calif. The Assembly approved Bonta's measure, AB22 that would prevent California state employees from being fired for being a member of the Communist Party. The bill now goes to the Senate. (AP Photo/Rich Pedroncelli)

SACRAMENTO, Calif. (AP) — Being a communist would no longer be a fireable offense for California government employees under a bill passed Monday by the state Assembly.

Lawmakers narrowly approved the bill to repeal part of a law enacted during the Red Scare of the 1940s and ’50s when fear that communists were trying to infiltrate and overthrow the U.S. government was rampant. The bill now goes to the Senate.

It would eliminate part of the law that allows public employees to be fired for being a member of the Communist Party.

Employees could still be fired for being members of organizations they know advocate for overthrowing the government by force or violence.

The bill updates an outdated provision in state law, said Assemblyman Rob Bonta, the San Francisco Bay Area Democrat who authored the measure.

Some Assembly Republicans said the Cold War-era law should not be changed.

ADVERTISEMENT

Assemblyman Randy Voepel, a Southern California Republican who fought in the Vietnam War, said communists in North Korea and China are “still a threat.”

“This bill is blatantly offensive to all Californians,” said Assemblyman Travis Allen, a Republican who represents a coastal district in Southern California. “Communism stands for everything that the United States stands against.”