A federal judge ruled on Friday that the National Security Agency’s controversial telephone metadata collection program is legal, the Associated Press reported.

U.S. District Court Judge William Pauley dismissed the American Civil Liberties Union’s lawsuit against the agency, calling the surveillance program the “government’s counterpunch” to terrorism. He justified it as necessary adaption “to confront a new enemy: a terror network capable of orchestrating attacks across the world."

The decision comes only a week after U.S. District Court Judge Richard Leon ruled the same program was likely unconstitutional. Leon stated, “I have significant doubts about the efficacy of the metadata collection program as a means of conducting time-sensitive investigations in cases involving imminent threats of terrorism.”

The conflicting rulings illustrated the controversial nature of the program, whose success in thwarting terrorism is hotly debated. In one iteration or another, the NSA’s collection of millions of American’s telephony metadata (the who, when, and where of calls) has been known about for years. It gained considerable attention in June 2013 when former intelligence contractor Edward Snowden leaked details of its operations.

Glenn Greenwald told the Daily Dot that the program was perhaps the most significant of all those leaked by Snowden. As these recent rulings show, it will no doubt be the first to make its way to the Supreme Court, where its legality will ultimately be decided.

Photo by steakpinball/Flickr