A Senate committee approved a measure Thursday that would require law enforcement agencies to obtain a court-approved search warrant before reviewing any e-mail or other electronic content.

The measure would close what privacy advocates describe as a loophole in the law in which Internet service providers such as Yahoo and Google may turn over e-mail older than six months if authorities obtain a subpoena, which does not require a judge’s approval.

The legal standard under which authorities may obtain electronic data has been the subject of increasing controversy at a time when massive amounts of private e-mails are routinely turned over to criminal investigators. The issue was brought into sharp focus by the case of former CIA director David H. Petraeus, who was forced to resign this month after investigators stumbled upon e-mails that exposed an extramarital affair he was having with his biographer.

Civil liberties advocates say that privacy law — based on the 1986 Electronic Communications Privacy Act — has not kept up with technology’s rapid advance and has made it too easy for law enforcement agencies to obtain personal information. Officials in the telecom industry say that in practice, large providers demand a warrant for all e-mail content.

Justice Department officials have argued that raising the standard may impede law enforcement’s ability to thwart crimes, given that it typically takes longer to obtain a warrant than a subpoena. Before obtaining a search warrant, investigators must demonstrate probable cause that the material sought will furnish evidence of a crime.

“In a wide range of investigations, including terrorism, violent crimes, and child exploitation, speed is essential,” then-Associate Deputy Attorney General James A. Baker told the Senate Judiciary Committee last year.

Despite the opposition of law enforcement agencies, the committee on Thursday passed an amendment to ECPA, as the law is known, by a bipartisan voice vote, with just one member, Sen. Jeff Sessions (R-Ala.), opposing it.

Although the amendment will not be taken up by the full Senate this year, Thursday’s vote enhances the chances that the measure will make it through the Democratic-controlled chamber next year, some analysts said.

“Today’s vote marks an historic step forward for online privacy,” said Gregory T. Nojeim, senior counsel for the Center for Democracy and Technology, a privacy group. “We live our lives online today. If law enforcement can obtain everything we say online to other people without a judge’s permission, not much is left of privacy. Internet service providers shouldn’t become the one-stop shop when law enforcement wants to investigate someone.”

The measure, offered by committee chairman Sen. Patrick J. Leahy (D-Vt.), puts under one uniform standard all e-mail content held by a third-party provider — the same “probable cause” standard that government investigators would have to meet to search someone’s home.

The legal standard for a subpoena is typically easy to meet. Federal and state prosecutors need only believe that the material would be relevant to an investigation.

Under current law, the government need not notify a person whose e-mail has been obtained with a search warrant. But under the Leahy measure, government officials must notify the person and provide a copy of the warrant within 10 business days unless they get a court order to delay notification. Under the measure, law enforcement agencies may seek a delay for up to 180 days.

The measure also would extend warrant protection to photos, videos and documents stored in third-party servers such as Dropbox and Facebook.

Some law enforcement officials said the proposed reforms go too far.

“If a confusing patchwork of case law had led to uncertainty for providers, then why is elevating the standard of access to probable cause for all electronic communications records the appropriate solution?” said Ronald C. Sloan, president of the Association of State Criminal Investigative Agencies, in a September letter to the committee leaders. He also called the extension of warrant protection to other electronic content “a far-reaching expansion of protections which necessitates a probing debate.”