NEW YORK — The union for longshoremen along the Gulf of Mexico and East Coast has agreed to extend its contract until early February, averting a possible strike that could have crippled operations at the Port of New Orleans and 13 other coastal ports that handle about 40 percent of all U.S. container cargo, a federal mediator announced Friday.

A strike would not have affected passenger cruise ships, U.S. mail, military cargo or perishable cargo with a limited shelf life. It also wouldn’t affect non-container, or break-bulk, cargo such as steel, wood products and cars.

Jay Hardman, executive director of the Port of Greater Baton Rouge, had said previously that he didn’t think a strike would have any effect on the local port’s operations.

That’s because the Port of Greater Baton Rouge handles primarily bulk cargo and commodities, as do most Louisiana ports.

At the Port of New Orleans, which has substantial container operations, the impact would have been significant.

“Needless to say, we were quite relieved and really happy about it,” Gary LaGrange, president and chief executive officer, said of the longshoremen’s contract extension.

LaGrange said the economic impact of a strike on the greater New Orleans area would be about $1 million a day, affecting 2,500 workers, including the longshoremen themselves.

The contract extension came after the union and an alliance of port operators and shipping lines resolved one of the stickier points in their months-long contract negotiations, involving royalty payments to the longshoremen for each container they unload.

Negotiations will continue until at least midnight Feb. 6. Some important contract issues remain to be resolved, but the head of the Federal Mediation and Conciliation Service, George Cohen, said the agreement on royalties was “a major positive step forward.”

“While some significant issues remain in contention, I am cautiously optimistic that they can be resolved in the upcoming 30-day extension period,” he said.

The terms of the royalty agreement were not announced.

LaGrange said he is encouraged that the container royalty issue appears to be cleared up since it was the biggest hurdle.

“I’m very confident, as I have been all along, that the two parties will agree to terms,” he said.

The master contract between the International Longshoremen’s Association and the U.S. Maritime Alliance originally expired in September. The two sides agreed to extend it once before, for 90 days, but it had been set to expire again at 12:01 a.m. Sunday.

As recently as Dec. 19, the president of the longshoremen, Harold Daggett, had said a strike was expected.

A work stoppage would have idled shipments of a vast number of consumer products, from electronics to clothing, and kept U.S. manufacturers from getting parts and raw materials delivered easily.

Business groups expressed relief that the two sides had agreed to keep the ports open.

“A coast-wide port shutdown is not an option. It would have severe economic ramifications for the local, national and even global economies and wreak havoc on the supply chain,” National Retail Federation President Matthew Shay said.

Major ports that would have been affected included the massive terminals serving New York City overseen by the Port Authority of New York and New Jersey, and critical seaports in Savannah, Ga., Houston and Hampton Roads, Va.

Other ports that would have been affected by a strike are in New Orleans; Boston; the Philadelphia area; Baltimore; Wilmington, N.C.; Charleston, S.C.; Jacksonville, Fla.; Port Everglades, Fla.; Miami; Tampa, Fla.; and Mobile, Ala.

Longshoremen on the West Coast have a separate collective bargaining agreement.

Advocate business writerChad Calder contributed to this report.