LOS ANGELES — The U.S. Supreme Court on Thursday partially overturned a Port of Los Angeles anti-smog program that replaced thousands of aging trucks with cleaner-burning models and forced trucking companies to sign agreements to meet other regulations.

The court struck down two sections of the complicated 2008 ordinance that required short-haul trucking firms using the nation's largest port complex to develop off-street parking plans and to post placards in rigs with a phone number that people could call to report concerns about safety or pollution.

In its unanimous decision, the Supreme Court said federal law pre-empted any regulation "having the force and effect of law related to a price, route, or service of any motor carrier ... with respect to the transportation of property."

The port, which handled more than 8 million shipping containers last year, has been working for years to reduce air pollution there amid concerns about its impact on surrounding neighborhoods.

The Clean Truck Program required hundreds of truckers to sign concession agreements that they would comply with those rules if they wanted to use the port. The court said the port met the "force of law" standard by making it a misdemeanor, punishable by fine or imprisonment, for a terminal operator to grant access to an unregistered truck.

However, it avoided considering whether the port could punish truckers for violating other provisions of the concession agreements, noting that it hasn't done so yet.

The American Trucking Associations, which sued the city and port, hailed the ruling.

"Our position has always been that the port's attempt to regulate drayage operators — in ways that had nothing to do with its efforts to improve air quality at the port — was inconsistent with Congress' command that the trucking industry be shaped by market forces, rather than an incompatible patchwork of state and local regulations," President and CEO Bill Graves said in a statement.

The decision will send a signal to other cities considering programs that would "impermissibly regulate the port trucking industry," he said.

In a statement, the port said concession agreements with truckers have been an important component of the Clean Truck Program and it was reviewing the court's decision to determine how it will affect that program.

However, port spokesman Phillip Sanfield said the decision wouldn't affect another key element of the program that banned older diesel trucks. Since 2008, the program has taken more than 1,500 older trucks out of operation and reduced diesel truck pollution at the port by some 90 percent, according to port statistics.

The Clean Truck Program is "the most extensive effort to clean up a port in the world," Mayor Antonio Villaraigosa said in a statement. "We are reviewing the Supreme Court's decision, but we intend to continue our efforts to clean LA's port to the extent the law allows."

The National Resources Defense Council, a national environmental group, said the ruling was narrowly focused.

"The heart of the clean trucks program is intact and the port's day-to-day operations do not need to change," said David Pettit, senior attorney and director of NRDC's Southern California Air Program.

"This continues to be a hard-fought battle against an industry clinging to its polluting practices," said Melissa Lin Perrella, senior attorney with NRDC.