When Charles Spencer became a crane operator at the Jacksonville Port Authority in Florida in 1971, it took at least a day for 200 dockworkers to unload 160-pound sacks of coffee from a cargo ship.

Now the same job takes 20 dockworkers, assisted by massive robots programed to lift and stack containers, an hour.

One thing hasn't changed, however: American dockworkers are among the highest-paid blue-collar workers in the country. Spencer says he made about $32,000 a year when he started; today, the average dockworker makes more than $115,000 a year.

Now, shipping companies are pushing hard to control costs, including the cost of labor - and workers are pushing back. It all comes down to who gets the rewards from the investment the port operators have put into increasingly automated equipment: the companies and their shareholders or the unionized dockworkers.

Despite the automation, U.S. port productivity badly lags that of overseas rivals. Rotterdam and Shanghai ports use fewer than five dockworkers to do what it takes 20 to do in the U.S., according to Jim Kruse, director of Texas A&M University's Center for Ports and Waterways. The gap is jarring at a time when shippers, the primary customers and in some cases the owners of port operators, have seen profits shrink, in part because of a glut of new ships.

It is a major reason for a series of increasingly heated struggles between port workers and their employers on the East, West and Gulf coasts of the United States in recent months centering on pay, workplace efficiency and automation.

Tensions are likely to remain high for some time, particularly as competition between ports increases ahead of the completion of a widening of the Panama Canal in 2014, which means more containers move straight from Asia to the East and Gulf coasts.

"Everyone wants to reduce their cost and that means lower wages or fewer people," said a senior executive at a major West Coast container terminal operator who spoke on the condition of anonymity so as not to affect future negotiations with labor unions.

The spate of labor disputes on the waterfront has not been seen since the early 1970s, when West Coast dockworkers went on strike. Then-President Richard Nixon invoked the Taft-Hartley Act, which limits the power of labor unions, to force them back to work.

Office workers at ports in Los Angeles and Long Beach, California, struck for eight days in a dispute about the outsourcing of jobs before returning to work in early December. Dockworkers refused to cross their picket lines, effectively shutting down most of the nation's largest shipping complex for that period.

Dockworkers on the East and Gulf coasts and in Pacific Northwest grain ports almost followed suit last month.

With a strike looming, the International Longshoremen's Association (ILA), which represents 14,500 dockworkers on the East and Gulf coasts, and the U.S. Maritime Alliance (USMX) of shippers, terminal operators and port authorities, agreed to a temporary deal on Dec. 28. A strike is still possible, though, if the talks don't lead to a final deal that is ratified by workers by Feb. 6.

Labor strife was also narrowly avoided at ports in the Northwest as the International Longshore and Warehouse Union (ILWU) announced on Dec. 26 that its members would stay on the job despite "substandard" contract terms imposed on them by grain shippers. That dispute could easily flare again in the coming months.

'A Fair Share of Benefits'

The ILA's national office and USMX declined to comment for this article. The ILWU said new productivity and technological goals should always keep employees in mind.

"Workers and the rest of society deserve to get a fair share of the benefits that can result when new technology is adopted," said ILWU spokesman Craig Merrilees.

One of the more contentious parts of East Coast negotiations was the amount of royalty payments to ILA workers based on the tons of container cargo that move through a port.

The payout was roughly $211 million in 2011, acco