AT&T is calling on Congress to settle the internet freedom debate by passing a federal net neutrality law.

In a full-page ad appearing in multiple U.S. newspapers on Wednesday, AT&T CEO Randall Stephenson said his company has suffered from regulatory whiplash. Various presidential administrations and government agencies have pursued wildly differing internet policies over the past decade.

AT&T wants clarity.

"It is time for Congress to end the debate once and for all, by writing new laws that govern the internet and protect consumers," Stephenson wrote.

He wants Congress to establish an "Internet Bill of Rights" that guarantees net neutrality, an open internet, and privacy protection for customers. Stephenson said the law should apply equally to all internet companies.

U.S. broadband companies, including AT&T, Comcast, Verizon and Spectrum, have largely opposed the government's past attempts to implement net neutrality regulation. For example, AT&T sued the FCC in 2015 in an attempt to block its net neutrality order that gave the government far more oversight of the broadband industry.

Consumer advocates say internet service providers like AT&T want to favor some websites, apps and services over others.

Related: More than 20 states sue to stop FCC's net neutrality repeal

It might seem surprising to see AT&T lobbying Congress to regulate the internet. Yet AT&T and Comcast (CMCSA) have long championed a legislative solution.

AT&T (T) benefits if everybody plays by the same rules. That has become a bigger threat after the Republican-controlled FCC voted last year to undo its 2015 net neutrality order. In response, several states have laid the groundwork to pass their own net neutrality laws.

For any big company, the only things worse than federal regulation are dozens of different state regulations.

"Because the internet is so critical to everyone, it's understandably confusing and a bit concerning when you hear the rules have recently changed, yet again," Stephenson wrote. "Legislation would ... provide consistent rules of the road."

Lawmakers in both parties have expressed support for net neutrality legislation, though its prospects remain unclear. It's possible but uncertain that the country's largest telecommunications company lobbying for a bill could usher it through a Republican-controlled Congress and White House.

AT&T may also have trouble getting consumer advocates on board. Stephenson didn't provide any specifics, including whether the bill of rights would block controversial "fast lanes" for services and sites that pay broadband companies for preferential treatment.

Yet Stephenson said AT&T intends to work with Congress, consumer advocacy groups and its internet competitors in a push for a permanent legislative solution.

Meanwhile, AT&T says it is committed to net neutrality.

"We don't block websites. We don't censor online content. And we don't throttle, discriminate, or degrade network performance based on content. Period," Stephenson wrote.

AT&T proposed buying CNN parent company Time Warner in 2016, but the Justice Department has sued to block the deal. The trial is set to begin in March.