Updated

A federal judge is blocking a California law set to go into effect Saturday that would have barred gun owners from possessing high-capacity ammunition magazines.

San Diego-based U.S. District Judge Roger Benitez said in ruling Thursday that the law banning possession of magazines containing more than 10 bullets would have made criminals of thousands of otherwise law-abiding citizens who now own the magazines.

He issued a preliminary injunction backing the legal challenge by the National Rifle Association-affiliated California Rifle & Pistol Association.

California Attorney General Xavier Becerra (HAH-vee-air Bah-sehr'-ah), who is defending the state law, did not immediately comment.

The judge says the law approved by voters in November takes away gun owners' Second Amendment rights and amounts to the government taking people's private property without compensation.

Lawmakers passed a similar law last year banning magazines.