SAN FRANCISCO (CBS / AP) – California voters who want to share photos of their marked ballots in next week’s election are out of luck.

A federal judge in San Francisco refused Wednesday to block a state law that bans ballot selfies.

U.S. District Judge William Alsup said allowing the images so close to Election Day would create confusion among voters and poll workers.

The American Civil Liberties Union sued Monday, seeking a court injunction preventing enforcement of the ballot-selfie ban. The group said the law violates voters’ free-speech rights by preventing them from expressing their political views.

Michael Risher, a senior staff attorney for the ACLU of Northern California, said he wasn’t immediately sure whether he would appeal the ruling.

A federal judge in Colorado is hearing arguments in a similar case Wednesday.

© Copyright 2016 The Associated Press. All Rights Reserved. This material may not be published, broadcast, rewritten or redistributed.