In 2003 — long before Edward Snowden ever got near a security clearance — an anti-government activist named Dan McCall decided to troll the Department of Homeland Security and the NSA.

Using the agencies' official seals, McCall whipped up merchandise that wouldn't look out of place on the National Mall — except, instead of those unselfconsciously earnest T-shirts shouting "FBI" at you, McCall's wares were slightly more subversive.

"U.S. Department of Homeland Stupidity," said one shirt. "The NSA: The only part of government that actually listens," read another.

Of course, it was only a matter of time before the Department of Homeland Security and the actual NSA saw their logos being re-appropriated without permission, and in 2011 they each sent cease-and-desist letters to Zazzle, the e-commerce site where McCall was selling his ironic merchandise.

Now, McCall's lawyer says he's reached a settlement with the government that acknowledges McCall's right to parody the agencies. Officials from the NSA had argued that using the seal for commercial gain without permission was a violation of federal law; DHS, meanwhile, had said it was a crime to "mutilate or alter" any government logo.

The settlement has both agencies rescinding their cease-and-desist letters and confirming McCall's right to produce parodies of the government. Looks like McCall is safe from federal lawyers for now — but he's no doubt attracted some heavy scrutiny from the very government whose power he opposes.

Parody and satire has a long history in U.S. law. This also isn't the first time someone's deliberately trolled the NSA and gotten away with it. Last year, a Dutch-Iranian filmmaker named Bahram Sadeghi prank-called the NSA with delightful results.