By Rory Carroll

SAN FRANCISCO (Reuters) - A federal judge in California has ruled that it is too close to the Nov. 8 election to change a longstanding law in the state that bans the taking of photos of marked ballots, the latest court ruling pertaining to voting "selfies."

U.S. District Court Judge William Alsup said on Wednesday lifting the ban at the last minute would create confusion and be unfair to the people running polling stations and the secretary of state.

The law was designed to prevent voter intimidation, but many believe it is outdated in the age of social media.

Also on Wednesday, a federal court judge in Colorado heard arguments in a case challenging a 19th century law there that criminalizes the showing of a completed ballot to others, which Denver District Attorney Mitch Morrissey said included posts on social media.

A litigant in the case told Reuters that the judge is expected to rule by Friday.

And late last month, a federal court sided with a Michigan man who said a law that bans voters from taking pictures of their marked ballots and sharing them on social media was an unconstitutional violation of the First Amendment right to free speech.

The controversy over ballot selfies rose to national prominence after pop singer Justin Timberlake posted a photo he took of himself voting in his hometown of Memphis to his 37 million followers on Instagram.

Authorities in Tennessee, which is one of 18 states with restrictions on photos in voting booths or of marked ballots, initially said they were investigating the singer before saying they did not think it was a good use of their resources.

A survey by AT&T released this week found that 20 percent of registered voters plan to take a selfies after they have voted.

It also found that 72 percent of respondents who are registered to vote do not share their opinions about the 2016 presidential election on social media.

The most inclined to share on social media are those less than 34 years old, according to the survey, which polled 3,608 U.S. mobile phone users.

Voters will chose a U.S. president on Tuesday, as well as U.S. senators, representatives and state and local officials.

(Reporting by Rory Carroll; Editing by Alistair Bell)