AUGUSTA — Maine law enforcement will have to get search warrants to gather information from cellphones including voicemails, text messages or location data under two new laws going into effect Wednesday.

Supporters say the measures approved by the Democratic-controlled Legislature last session are essential because the related federal law is woefully out of date, leaving residents’ privacy vulnerable as technology has advanced.

Signed in 1986, the federal law “dates from an era when cellphones were the size of bricks and there was no GPS,” said Zach Heiden, legal director for the American Civil Liberties Union of Maine.

Under the new laws, police will have to show probable cause that the information they’re seeking is relevant to a criminal case, unless they can prove that waiting for a warrant will put someone’s life or safety in danger.

But the office of Attorney General Janet Mills and Maine State Police fiercely opposed the bills, saying they are both unnecessary and could hamper criminal investigations.

“You’ve added some extra requirements and some pitfalls that we have to avoid, but are you really solving any problems?” said William Stokes, head of the state attorney general’s criminal division.

Law enforcement say federal law already requires search warrants to gather real-time location information and communications. To get historic cell-tower data, however, they currently only have to obtain a court order, which has a lower legal standard than a search warrant.

Republican Gov. Paul LePage vetoed the cellphone location information bill, saying it would be too burdensome and make it harder for law enforcement to use location information to crack criminal cases. But lawmakers disagreed, overturning his veto.

State Police Maj. Chris Grotton said the agency almost always uses a warrant to get location information, but in cases where authorities can’t yet allege that there’s been a crime, such as when someone is missing, they use a court order. He said he worries the new law will prevent them from getting that information.

“It’s going to be the difference between finding someone and not finding somebody,” he said. “My fear is that there is going to be a bad result and we’re going to have to tell someone that we aren’t able to get that information.”

Stokes said they’ve been working with state police to develop a template for the new warrants they’ll be using and that police will be undergoing training this week about the changes and how to ensure they’re complying with the new law, he said.

“We’ll comply with the law; that’s what we do,” he said. “We’ll just see how problematic this becomes.”

Law enforcement will also have to notify someone that they’ve obtained their information within three days under the new laws. The final version of the laws allows a court to waive that requirement if it would adversely affect a criminal investigation.

People have the right to know when they are being searched by police, Heiden said. “When police come to conduct a search of your home, they’re supposed to present you a copy of the search warrant. The same principle should apply when they’re searching personal information.”

Maine joins Montana as the second state to require warrants for cellphone location information.

Federal courts have been divided over the issue. In July, the 5th U.S. Circuit Court of Appeals said authorities only need a court order to obtain cellphone records that can be used to track a person’s movements.

That same month, the New Jersey Supreme Court said all law enforcement in the state must get a search warrant based on probable cause.