Specifically, they implemented distributed denial-of-service (DDoS) attacks on the internet relay chat (IRC) rooms used by Anonymous. They also implanted malware to out the personal identity details of specific participants. And while we only know for sure that the U.K.'s GCHQ and secret spy unit known as the "Joint Threat Research Intelligence Group" (JTRIG) launched these attacks in an operation called "Rolling Thunder," the U.S.' NSA was likely aware of what they were doing because the British intelligence agents presented their program interventions at the NSA conference SIGDEV in 2012. (Not to mention the two agencies sharing close ties in general.)
Whether you agree with the activities of Anonymous or not — which have included everything from supporting the Arab Spring protests to DDoSing copyright organizations to doxing child pornography site users — the salient point is that democratic governments now seem to be using their very tactics against them.