A federal judge has decided it’s legal, thereby dismissing a lawsuit from the American Civil Liberties Union. U.S. District Judge William Pauley said in a written opinion that the NSA’s collection of Americans’ phone records “represents the government’s counter-punch” to prevent terrorist attacks, the Associated Press reports. “There is no evidence that the Government has used any of the bulk telephony metadata it collected for any purpose other than investigating and disrupting terrorist attacks,” he wrote, according to USA Today, adding that the program is subject to executive and congressional oversight. Justice Department spokesman Peter Carr said the department is “pleased with the decision,” while the ACLU, which filed suit right after Edward Snowden leaked NSA details earlier this year, did not respond to AP’s request for comment.