Don’t look now, but digital privacy rights are making a major comeback in the United States. Thursday saw the latest in a series of recent victories for those who are against secret and unconstitutional surveillance.

After years of dogged investigations by journalists and relentless pressure by lawyers and advocates, the Justice Department abruptly changed its policy around stingray mass surveillance devices – roving, fake cell phone towers that the FBI and other government agencies use to force all the phones in their vicinity to connect to and feed your personal data. Finally, federal law enforcement will be required to get a judge-signed warrant before using the tool. They’ll have have to delete the data of innocent people immediately, and clearly explain to judges what they’re doing.

The extreme secrecy surrounding the government’s use of the tools has been controversial for years, not only since stringrays can vacuum up information on whole neighborhoods at a time, but because the government has been concealing their use from even prosecutors and judges.

The idea that DOJ needs a policy telling law enforcement to be honest to judges is pretty troubling. — Hanni Fakhoury (@HanniFakhoury) September 3, 2015

While it’s a significant step up for the Fourth Amendment rights of all Americans, there are still some huge holes: state and local governments don’t have to abide by the rules. It’s also just a policy – not the law, so there’s nothing preventing the Justice Department from changing it again. And there’s a good argument it’s illegal to use them at all, since they can find people inside private homes without getting a warrant for each house they search. But given that up until recently, the FBI wouldn’t even publicly acknowledge stingrays existed – let alone require a warrant – this is a huge win.

Despite critics often snidely proclaiming to civil liberties activists that “privacy is dead,” the opposite is true. In the past two years, digital privacy rights in the US have markedly improved and the stingray case is only the latest example.

Two years ago, the cops could look at the contents of your cell phone without a warrant if they arrested you, the NSA could track your calls and map all our contacts without an individual court order, and the FBI could use stingrays to suck up the cell phone data of hundreds of innocent people at the same time.

Now all of those activities are forbidden. The Supreme Court ruled police need a warrant to get into the cell phone of the approximately 12 million people that are arrested each year. Congress passed the USA Freedom Act, which will force the NSA to go to the Fisa court each time it wants to data mine an American’s cell phone records. And now, stingrays require a warrant.

That’s not all: Since the Snowden revelations, judges have gotten more discerning of law enforcement surveillance requests (the Washington Post called it “the magistrate’s revolt”) and large tech companies have also gotten a lot more skeptical when dealing with the government, pushing back on spying requests, challenging them more in court and beefing up their encryption.

That’s not to say the battle is even close to won. The government is constantly trying to find new ways to warrantlessly track Americans and foreigners alike, whether it’s with license plate readers, facial recognition, or next-generation cell phone location trackers with ominous sounding names like Jugular and Lone Wolf. The NSA remains largely unrestrained. Corporations also continually are finding new and hard-to-detect ways of mapping our web habits. And even the reforms mentioned above are fairly mild and don’t go nearly far enough.

But with sunlight forced upon law enforcement by journalists, whistleblowers and activists, coupled with legal pressure from civil liberties groups, it is undoubtedly having an effect. If privacy was ever dead, it is now unquestionably rising from the grave.