The nation’s retailers, manufacturers and farmers are bracing for a possible strike that could idle U.S. ports all along the Eastern Seaboard and Gulf Coast.

That walkout could begin as early as Sunday after the midnight Saturday expiration of a 90-day extension of a contract between the International Longshoremen’s Association and several shipping lines, terminal operators and port associations.

It would be the first strike by the ILA in 35 years.

Until negotiations broke down last week, the union and the U.S. Maritime Alliance Ltd. — a group of ocean cargo shipping lines, cargo terminal operators and port associations — had been trying to iron out terms of a new six-year contract.

In South Carolina, the State Ports Authority is bracing for a possible strike by extending operations at its busiest terminals to lessen the impact of a walkout.

In an email sent to shipping lines last week, the SPA detailed steps to lessen the impact of cargo flow, including two extra operations hours in the weekdays following Christmas.

The agency’s two main container docks in Mount Pleasant and North Charleston also will be open for business on Saturday, a day usually reserved for truck traffic only.

SPA spokeswoman Allison Skipper said last week that the extended hours are designed to give shippers more time to move more of their cargo across the state’s ports.

A strike wouldn’t affect passenger cruise ships, U.S. mail, military cargo or perishable cargo with a limited shelf life. It also wouldn’t affect cars and other non-containerized cargo known as break bulk.

The ILA represents 14,500 workers at the Port of Charleston and 14 others that extend south from Boston. They handle 95 percent of all containerized shipments from Maine to Texas.

One economist who tracks international trade called the dispute a contest of wills between some of the world’s biggest cargo operators and one of the nation’s strongest labor unions.

The biggest issue of contention involves so-called container royalty fees on cargo, which supplement dockworker wages. Employers want to cap those fees and limit who gets them. The union says the royalty fees should not be changed.

“The shipping industry is trying to take back some of the power,” said economist John Husing, founder of Economics and Politics Inc. in Redlands, Calif., “but they are up against a union that has abnormal power for its size and one that is in a very strong position.”

The royalties are payments to union workers based on the weight of cargo received at each of the ports.

They were created in the 1960s to boost wages and finance worker benefits after increased automation cut into salaries and jobs, making it impossible for the dwindling labor force to finance its benefits, said ILA spokesman James McNamara.

The container carriers and port operators want to cap the royalties at 2011 levels, saying they have morphed into a huge expense and a totally unrelated to their original purpose, which hurts the industry’s competitiveness as it tries to keep up with new technology.

The alliance said the royalty payments now amount to a bonus averaging $15,500 annually for East Coast workers who already earn more than $50 per hour.

Ronald D. White of the Los Angeles Times and Tyrone Richardson of The Post and Courier contributed to this report.