AUGUSTA — Maine law enforcement officers will have to get search warrants to gather information from cellphones including voicemails, text messages or location data, under two laws that will take 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 advances.

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.

The Attorney General’s Office and Maine State Police fiercely opposed the bills, saying they are 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 attorney general’s criminal division.

Law enforcement officials say federal law already requires search warrants to gather real-time location information and communications. To get historic cell-tower data, however, the requirement now is only 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 overturned his veto.

State police Maj. Chris Grotton said the agency almost always uses warrants to get location information, but when authorities can’t yet allege that a crime has been committed, such as when someone is missing, they use court orders. He said he worries that 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 prosecutors have been working with state police to develop a template for the new warrants they will use, and police will get training this week about the changes and how to ensure they’re complying with the new law.

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

Also under the new laws, law enforcement will have to notify anyone whose information has been obtained, within three days. The laws allow a court to waive that requirement if it would hamper 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 two states that require warrants for cellphone location information.

Federal courts have been divided on the issue.

In July, the 5th U.S. Circuit Court of Appeals said authorities need court orders only 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 search warrants based on probable cause.