A federal judge dismissed a long-stalled class-action lawsuit against the National Security Agency on Wednesday, writing that a suggestion he was influenced by the “deep state” was no substitute for “well-pleaded” legal arguments.

U.S. District Judge Richard Leon wrote that conservative legal activist Larry Klayman had not offered a sufficient legal basis for keeping the case active against the NSA's bulk collection of domestic call records.

“Instead, Klayman accused this Court of being ‘coopted by the so called ‘Deep State’’ into ruling against him. Unfortunately for plaintiffs, such baseless accusations are no substitute for a well-pleaded complaint,” Leon wrote.

Klayman told the Washington Examiner he found Leon’s ruling “disrespectful” and that the judge “got turned, somehow.”

In a Thursday filing, Klayman wrote that Leon failed to answer a “legitimate question” about whether he had been contacted by the FBI or spy agencies before dismissing three other cases alleging illegal surveillance by the NSA.

Klayman's tough words come after years of amiable court hearings in which he praised the judge and suggested Leon was all that stood between the American people and tyranny.

In late 2013, Leon ruled in favor of Klayman, finding the NSA likely was violating the Fourth Amendment with its “almost Orwellian” call-record dragnet, which was exposed in June 2013 by former NSA contractor Edward Snowden. Leon dismissed that case in November, finding it mooted by the USA Freedom Act, which sought to end the automatic bulk collection of domestic phone call metadata.

Also in November, Leon dismissed a case brought by Klayman against an NSA internet surveillance program called PRISM. Earlier this month Leon dismissed a case filed by Klayman alleging surveillance abuses on behalf of former government contractor Dennis Montgomery.

In a March 20 filing, Klayman wrote that he was baffled by Leon's decision to dismiss the cases. “It now appears that your Honor too has been coopted by the so called 'Deep State,' through threats or other forms of coercion, direct, indirect or subliminal,” Klayman wrote.

Klayman said he will appeal Leon’s decision to dismiss the four cases.