Cellphone service companies would have to give police access to certain data without warrants to track people in emergencies under a bill that cleared Virginia's General Assembly on Thursday.

The legislation, sponsored by Del. Timothy D. Hugo, R-Fairfax, passed the Senate on a 35-to-5 vote despite objections from a few Democrats and Republicans concerned about privacy rights. The House of Delegates previously passed the measure in a unanimous vote.

The bill would allow law enforcement officers to obtain real-time location data from cell service providers in cases involving immediate danger to a person, such as a kidnapping.

Sen. J. Chapman "Chap" Petersen, D-Fairfax, opposed the bill, saying it "guts" the Constitution's Fourth Amendment protection against unreasonable search and seizures. He said officers should have to obtain a warrant.

"There are magistrates available 24/7," he said.

But supporters of the measure said that magistrates are not always accessible in some parts of the state and that delays in certain situations could cost lives. Sen. Richard H. Black, R-Loudoun, who normally sides with privacy advocates, said the law has always allowed police to search without a warrant under "exigent circumstances."

"Sometimes you just have to take action," he said.

The bill now moves to Gov. Terry McAuliffe, a Democrat. His spokesman, Brian Coy, said the governor will review the legislation.

This story originally appeared on PilotOnline.com