The Justice Department acknowledged for the first time in a terrorism prosecution that it needs to tell defendants when sweeping government surveillance is used to build a criminal case against them.

The about-face, contained in a Tuesday court filing, marks another way in which the Obama administration is adjusting to revelations by former National Security Agency contractor Edward Snowden about phone and Internet surveillance by the NSA. The revelations forced the government to acknowledge publicly aspects of its widespread...