The 2014 telecom industry reform, one of Mexican President Enrique Pena Nieto's signature accomplishments, prohibited America Movil from charging other carriers for calls made to customers on its network, even though those firms are allowed to bill America Movil for using their networks.

The reform was aimed at breaking up Slim's market dominance, which rivals said made it challenging for them to break into the sector. It was one of several changes, along with an opening of the state-run energy industry, that have increased competition in Mexico's strategic industries.

The Supreme Court ruling said the so-called interconnection rates should be set by telecom regulator IFT, siding with America Movil - Latin America's largest telecom firm by number of subscribers and the crown jewel of Slim's empire. Tariffs set by the IFT will take effect from January 2018, the court said.

America Movil hailed the ruling in a brief statement late on Wednesday, calling on the IFT to set interconnection rates that are "oriented toward costs, transparent and reasonable."

In its ruling, the court also said, however, that the ruling would not have "retroactive effects," suggesting competitors such as AT&T Inc and Telefonica would not have to reimburse America Movil for the time they did not pay.

"The (IFT) will be responsible under its constitutional mandate for recognizing the asymmetry, establishing regulation regarding rates, the so-called 'zero-rate' or whatever else it defines, in line with the exercise of its constitutional faculties," Minister Javier Laynez Potisek said during the court's session.

The decision worried foreign companies, which have invested heavily in the market since the reform. Telefonica voiced grave concerns, saying the ruling had "serious consequences for the sustainability and makeup" of the sector.

In a possible sign of the pressure the regulator will come under as it ponders whether to allow America Movil to charge, the Spanish company said it and others had been severely hurt by the decision and called on Mexican authorities to find a balance.

The office of the president said it respected the court's decision and trusted that the regulator would use its powers to strengthen competition in a sector it described as key to the country.

AT&T also said it trusted the IFT to respect the spirit of the reform.

"AT&T invested in Mexico trusting in the strong public support that the constitutional and legislative reforms of telecommunications received," the company said. "The arduous task of reforming the industry has hardly begun and requires continuous dedication."

The IFT said in a statement that it would analyze the court's decision and take appropriate action.

Shares of America Movil were up more than 1 percent following the news of the decision. The company did not respond to a request for comment.

If its rivals had paid the same interconnection rates as America Movil, Slim's company would have received additional revenue of over $1 billion, according to a recent report by Banamex.

Industry experts believe the decision weakens the reform, which significantly lowered prices for consumers.

"It opens up Pandora's box and creates a terrible uncertainty," said Luis Rubio, a partner specializing in telecommunications at the law firm Jones Day.

America Movil fought hard against the reform, arguing to the court that legislators did not have the right to create "asymmetrical" rules meant to handcuff Slim's firm and help smaller industry players.

Although America Movil's market share only slipped modestly after the reform, hovering around two-thirds of mobile subscriptions in Mexico, the entry of new players such as AT&T with billions of dollars in foreign investment touched off a price war among carriers.

Cellphone service prices dropped by more than 40 percent, according to Mexico's telecom regulator.

But if interconnection rates paid to America Movil eat into carriers' margins, prices may begin to creep up again as a result of the decision, said analyst Ernesto Piedras. "The benefits of the (so-called zero-rate policy) are diverse – the investments, the coverage, the quality."

The ruling does not necessarily spell a return to the past, industry experts said.

The IFT, created as part of the reform, enjoys greater autonomy than the previous regulator and has broad authority to police the operations of telecom companies and TV broadcasters.

It has ratcheted up antitrust scrutiny against America Movil, ordering the firm to separate part of its network infrastructure into a new entity in March.

By clarifying the role of the IFT, the decision could prove helpful to other players in the market, said Ramiro Tovar Landa, a professor at the Autonomous Technological Institute of Mexico.

"The resolution is beneficial for the sector because it normalizes the economic relations between the operators," he said.

(Additional reporting by Frank Jack Daniel; Editing by Frank Jack Daniel, G Crosse and Lisa Shumaker)

By Noe Torres, Julia Love and Sheky Espejo

Stocks treated in this article : AT&T, Telefonica