Lawmakers in Maine are putting themselves at the forefront of efforts to curb excessive surveillance by instituting new privacy safeguards.

Last week, the Maine House of Representatives voted 113-28 in favor of legislation that would in all but exceptional cases prohibit law enforcement agencies from tracking cellphones without a warrant.

If enacted, LD 415 would make Maine the first state in the country to require authorities to obtain a search warrant before tracking cellphones or other GPS-enabled devices.

The law would also require that law enforcement agencies notify a person that she was tracked within three days, unless they can prove that secrecy is necessary, in which case a delay can be granted for up to 180 days.

LD 415 would additionally require the publication of an annual report online detailing the number of times location data were sought by law enforcement agencies.

According to Maine’s Bangor Daily News, law enforcement officials in the state opposed the bill on the grounds that requiring a warrant for location data could impede investigations.

However, proponents of LD 415 successfully argued that it was necessary to introduce the law to update the outdated Electronic Communications Privacy Act, a federal law passed in 1986.

Back in March, a similar bill was proposed in Texas — but it did not progress through the state House and never made it to the floor for a vote.

Texas lawmakers instead focused their efforts on passing separate privacy legislation, described as “unprecedented,” that would shut down a controversial legal loophole allowing the authorities to obtain copies of emails without a warrant if they are more than 180 days old.

But cellphone tracking has remained an issue high on the agenda in other states — as the significant development in Maine illustrates.

Civil liberties groups across the country have been vocal in their demands for a cellphone tracking warrant requirement since a congressional inquiry in 2011 revealed that tracking was rampant and that the legal checks that regulate it were applied inconsistently.

The issue has also been kept in the spotlight by a series of revelations about the FBI’s use of a clandestine cellphone tracking tool called the Stingray, and was the subject of a House Judiciary Committee hearing last month.

For the Maine legislation, there’s just one more challenge ahead.

While the state Senate has already voted in support of the bill, 20-15, local news reports have speculated that unless the legislature can find funding for LD 415 — almost $234,000 during the next two years — final enactment could fall through.

Either way, the ACLU chapter in Maine is already describing the bill as “historic,” celebrating last week’s vote by announcing in a blog post that it “brings us one step closer to putting necessary privacy protections in place while allowing the police to protect our communities.”

Ryan Gallagher is a London-based journalist who reports regularly on surveillance technology for Slate.