WASHINGTON (AP) — The Supreme Court on Wednesday seemed likely to preserve the $8 billion a year the government spends to subsidize phone and internet services in schools, libraries and rural areas.

The justices heard nearly three hours of arguments in a new test of federal regulatory power, reviewing an appellate ruling that struck down as unconstitutional the Universal Service Fund, the tax that has been added to phone bills for nearly 30 years.

Liberal and conservative justices alike said they were concerned about the potentially devastating consequences of eliminating the fund that has benefited tens of millions of Americans.

The Federal Communications Commission collects the money from telecommunications providers, which pass the cost on to their customers.

A conservative advocacy group, Consumer Research, challenged the practice. The justices had previously denied two appeals from Consumer Research after federal appeals courts upheld the program. But the full 5th U.S. Circuit Court of Appeals, among the nation’s most conservative, ruled 9-7 that the method of funding is unconstitutional.

The 5th Circuit held that Congress has given too much authority to the FCC and the agency in turn has ceded too much power to a private entity, or administrator.

Justice Sonia Sotomayor said the FCC subsidies cover only phone and internet services. “It a very real constraint. They are the only two services that have been identified,” Sotomayor said.

Justice Neil Gorsuch seemed most supportive of the challengers, calling the fund “a tax that's unlike any other tax this court has ever approved.”

The last time the Supreme Court invoked what is known as the nondelegation doctrine to strike down a federal law was in 1935. But several conservative justices have suggested they are open to breathing new life into the legal doctrine.

The conservative-led court also has reined in federal agencies in high-profile rulings in recent years. Last year, the court reversed a 40-year-old case that had been used thousands of times to uphold federal regulations. In 2022, the court ruled Congress has to act with specificity before agencies can address "major questions," in a ruling that limited the Environmental Protection Agency's ability to combat climate change.

“This is simply not the right case for the court to revamp the nondelegation doctrine,” lawyer Paul Clement told the justices on behalf associations of telecommunications companies.

The Trump administration, which has moved aggressively to curtail administrative agencies in other areas, is defending the FCC program. The appeal was initially filed by the Biden administration.

“Neither Congress’s conferral of authority on the FCC, the FCC’s reliance on advice from the administrator, nor the combination of the two violates the Constitution,” acting Solicitor General Sarah Harris wrote in a Supreme Court brief.

Consumer Research calls the situation a “nightmare scenario” in which Congress has set no limits on how much the FCC can raise to fund the program. “Predictably, the USF tax rate has skyrocketed. It was under 4% in 1998 but now approaches 37%,” lawyers for the group wrote.

They said there is an easy fix: Congress can appropriate money for the program, or at least set a limit on how much can be spent, even in the trillions of dollars.

But several justices said that Congress could satisfy objections by setting an astronomically high figure that provides no real limit. “That sounds like a meaningless exercise,” Justice Amy Coney Barrett said.

But last year, Congress let funding lapse for an internet subsidy program, the Affordable Connectivity Program, and the FCC moved to fill the gap by providing money from the E-rate program, one of several funded by the Universal Service Fund.

Congress created the Universal Service Fund as part of its overhaul of the telecommunications industry in 1996, aimed at promoting competition and eliminating monopolies. The subsidies for rural and low-income areas were meant to ensure that phone and internet services would remain affordable.

A decision is expected by late June.