Dan McCall sells a lot of T-shirts, coffee cups and other products that tweak the government, so his designs parodying the National Security Agency and the Department of Homeland Security were pretty typical fare.

Until the cease-and-desist demands hit.

The situation turned into a First Amendment primer — that it is, in fact, OK to use government agency seals to lampoon or criticize. McCall sued, his case handled pro bono by Public Citizen in Washington and Baltimore attorney Ezra Gollogly, and the two agencies agreed in a settlement to reverse course.

"They had an attack of good judgment and did the right thing," said Paul Alan Levy, an attorney with Public Citizen who represented McCall.

Two of the products at issue used the NSA seal with tongue-in-cheek mottoes: "Spying On You Since 1952" and "The NSA: The only part of government that actually listens." The third modified the Homeland Security logo with a goofy-looking eagle and the words, "U.S. Department of Homeland Stupidity."

Cease-and-desist demands over logos usually come from corporations, not Uncle Sam. You can't infringe on a copyright by appropriating the seal of a federal agency because U.S. government works are excluded from such protection.

But when the Fort Meade-based NSA told online retailer Zazzle to take down NSA-related images by McCall and other vendors, it cited a different law.

That statute bars the use of the NSA's name or seal "in connection with any merchandise, impersonation, solicitation, or commercial activity in a manner reasonably calculated to convey the impression that such use is approved, endorsed, or authorized by the National Security Agency."

Homeland Security, meanwhile, cited still another law — one that threatens fines and jail time for anyone who "falsely makes, forges, counterfeits, mutilates, or alters the seal of any department or agency of the United States."

"I just thought that was Orwellian," said McCall, a "1984" fan whose designs include "Big Brother Is Watching You" posters, magnets and shirts.

Both agencies declined to comment about the case or the February settlement. As part of the agreement, they acknowledged to Zazzle that the designs did not violate those laws.

Bruce Boyden, an assistant professor of law at Marquette University who followed the case, said the key phase in the statute the NSA cited about the use of its seal is the part about conveying the impression of endorsement.

It's hard to argue that anyone would think the NSA produced those designs, he said, since it is the butt of the joke.

"It seemed to me that the intent of the statute is to say you can't use these logos in order to impersonate, let's say, an NSA agent or pretend to be the NSA on correspondence or something like that, which seems perfectly reasonable," Boyden said. "If you go too far and say, 'You can't use the NSA logo for any purpose,' that would start to intrude on people's First Amendment rights."

Parody is fair game, he added, whether the logo belongs to the government or a corporation.

McCall, a graphic designer from Minnesota who runs a business called LibertyManiacs.com, sells his products through retailers such as Zazzle. It was Zazzle — not McCall — that received the takedown demands, he wrote in his lawsuit.

Those demands came in 2011. But McCall said he had no idea at the time because Zazzle didn't tell him.

He first realized something was up shortly after uploading NSA products to Zazzle last June, after contractor Edward Snowden's revelations about widespread government spying on Americans.

Zazzle quickly told him to take the designs down, at first saying only that there was a dispute over them, McCall said.

Eventually, Zazzle revealed who was disputing the products, but the retailer's rattled staffers still wouldn't turn over the cease-and-desist letter, McCall said.