The state of California is looking to pass a law stating the federal government would need a warrant from a judge if it wants to search residents’ cellphones and computer records. The bill passed the state senate with just one person voting against.

The bill was introduced following information that was leaked by former National Security Agency contractor Edward Snowden, who showed that US citizens had been subject to massive internal surveillance by the NSA.

"The Fourth Amendment to the US Constitution is very clear. It says the government shall not engage in unreasonable search and seizure," said the bill's author, Democratic State Senator Ted Lieu of Torrance, to Reuters. "The National Security Agency's massive and indiscriminate collecting of phone data on all Americans, including more than 38 million Californians, is a threat to our liberty and freedom."

California is one of eight states to introduce such measures, according to Lieu’s spokesman, Jeff Gozzo. Alaska, Arizona and Oklahoma are also looking to counter this problem, though America’s most populous state is the nearest to getting legislation passed. The bill will be heard before an assembly policy committee in June 2014.

The Obama administration is unhappy about the powers of NSA being diluted. Last year a federal judge ruled that the NSA’s practice of ‘spying’ on its citizens was unconstitutional. The US government is currently appealing this ruling.

The California bill would not allow any law enforcement or other officials to help federal agencies look into phone records, internet use, or any other electronic activity by residents of the state unless a warrant has been authorized by a judge.

The legislation was first mooted in January 2014. Known as Senate Bill 828, Joel Anderson co-sponsored it with Lieu. The state senators were prepared to go to extreme measures to make sure the rights of the citizens of California are no longer infringed.

The bill is happy to target government-owned utilities (water and electricity); any public universities that allow their facilities to be used as NSA research facilities and their campuses as recruiting grounds. They are also willing to impose sanctions on any corporations trying to fill the gaps left by the utility providers and other state companies. Finally, the bill also seeks to ban any local or state criminal investigations from carrying out their work using data harvested by government snooping without a specific warrant. In the absence of such a document, the information will simply be inadmissible in court.

Earlier this month, the House Judiciary Committee voted 32-0 to move along legislation, which would bring a halt to the NSA’s controversial activities, with amendments to the USA Freedom Act. As part of the bill, the NSA would need to prove to a judge that an individual is somehow connected to terrorism before being granted access to their personal data.

The bill reflects recommendations forwarded last year by a presidential Review Group that advised the NSA to stop pressuring tech companies to put ‘back doors’ into their programs, which gives the NSA unfettered access to customers’ records.

Under the NSA’s so-called PRISM program, which former NSA contractor-turned-whistleblower Edward Snowden revealed last year to intense international condemnation, the NSA collects and stores numbers dialed and call times but does not record the conversations.

However, even that claim of limited powers was challenged in March after it was reported that the NSA operates another program, dubbed MYSTIC, that gives it the power to “retrieve audio of interest that was not tasked at the time of the original call,” according to the Washington Post.