When the Supreme Court first encountered the internet, the justices expressed wonder at its potential. “It is ‘no exaggeration to conclude that the content on the Internet is as diverse as human thought,’” marveled Justice John Paul Stevens, then the court’s oldest member. The court decided that, unlike the more regulated television and broadcast media, this “‘unique and wholly new medium of worldwide human communication” was entitled to full First Amendment protection.

In the decades since, the threats to internet freedom in the United States have come not from outright censorship or from traditional government regulation, but from mass surveillance and from corporate control. Judge Brett Kavanaugh, President Trump’s nominee for the Supreme Court, has not only ruled in favor of both—he has gone out of his way to express these views in alarmingly activist fashion.

In 2015, Judge Kavanaugh considered a constitutional challenge to an NSA program of mass surveillance of telephone call detail records under Section 215 of the Patriot Act. In this program, the NSA collected all call detail records belonging to major American telephone companies, including both international and domestic U.S. calls. These records include the date, time and length of telephone calls, along with the telephone numbers of the participants. All call detail records, not just those of terrorist suspects, were ingested into the NSA’s vast databases for analysis.

The mass surveillance program only became public after former NSA contractor Edward Snowden leaked documents about the program to journalists. A federal district judge struck down the program in December 2013, writing that it was “almost Orwellian” and likely violated the Fourth Amendment’s ban on unreasonable searches and seizures. James Madison, the author of that amendment, would be “aghast” at mass surveillance, the judge wrote.

On appeal, the case came before the U.S. Court of Appeals for the District of Columbia Circuit, on which Judge Kavanaugh sits. Few lawyers on either side were surprised when the government prevailed. The most important precedent involved was a case from the late 1970’s in which the Supreme Court held that telephone records are not protected by the Fourth Amendment because they are records of a “third party”—the telephone company—and not the caller.

The appeals court issued a per curiam order turning down the plaintiff’s request for a rehearing, but Kavanaugh wrote separately to make clear his strong support of mass surveillance. After explaining his support for the “third party” doctrine—which was enough to decide the case—Kavanaugh went on to argue that it didn’t matter whether the data the NSA was vacuuming up was protected by the Fourth Amendment. Even if collection of telephone records in bulk constituted a search under that amendment, it was a reasonable one, he said, and therefore constitutional. The NSA’s surveillance program “readily qualifies as reasonable,” Kavanaugh wrote, because it “serves a critically important special need – preventing terrorist attacks on the United States.”

When Senator Patrick Leahy (D-VT) pressed Kavanaugh on NSA surveillance at his confirmation hearing on Thursday, September 6, he dodged the real issue by saying he was just following precedent on the lack of constitutional protection for data given to third parties. This response was disingenuous at best; the problem with Kavanaugh’s opinion was not his conventional discussion of the third party doctrine, it was his radical views on what lawyers call the “special needs” doctrine that justifies warrantless searches and surveillance.

Kavanaugh did not invent the “special needs” doctrine. The idea is that the government may sometimes need to implement a systematic program of warrantless searches to protect public safety—as in the case of airport screening. The problem is that Kavanaugh ignored entirely the careful analysis the doctrine requires; instead, he gave the government a “get-out-of-the-Constitution” free card just by invoking the terrorism threat. Moreover, by the time of his opinion, an official privacy oversight board had already found the program had not prevented a single terrorist attack.

Mass surveillance of data by government presents a threat to privacy. But corporations that seek to control internet traffic may present as great a threat to internet freedom.

In 2017, Kavanaugh considered a challenge to net neutrality rules. The question was whether the Federal Communications Commission had the power to protect consumers by adopting regulation preventing telephone and cable companies from discriminating against websites and services by blocking them or slowing them down. The court had to decide whether the agency could issue these rules, or whether “net neutrality” was a major policy issue that Congress should decide. When a panel of the U.S. Court of Appeals for the D.C. Circuit ruled in favor of “net neutrality,” the companies asked for a rehearing by the entire court. The D.C. Circuit rejected the request; Kavanaugh wrote in dissent to explain why he would have granted it.

Again, Kavanaugh was not content with just invoking precedent about what rules the FCC had power to create, which would have simply punted the issue back to Congress. Instead, he argued that the issue should not be decided by Congress at all, writing that net neutrality violated the constitutional rights of telecommunications and cable companies. Kavanaugh took the position that the decisions of these companies to throttle the speech of those services they disfavored were comparable to a newspaper editor’s decision about what articles to publish—a choice protected by the First Amendment’s guarantee of freedom of speech and the press.

In fact, Kavanaugh had it exactly backwards. If publishers and ordinary people don’t have fair access to the internet, the public square will be subject to censorship by large, often monopolistic companies like Cox, Comcast and Verizon. Instead of protecting the rights of ordinary people—or even the companies that produce internet content—Kavanaugh used the First Amendment to invent a new corporate “right” to censor speech.

While the digital age is well underway, the justices have only begun to grapple with its implications—for privacy, freedom of speech, and new forms of digital control. Kavanaugh’s vote will be for an internet based not on openness and freedom, but on surveillance and control.