The push over the last decade by international maritime ports to fully automate operations has sparked the ire of many U.S. longshoremen whose high-paying jobs and way of life are at stake. The trend also sets up a battle between their unions and companies and governments who see automation as a cleaner, more efficient and more cost-friendly alternative to the current system.

“This may be the most difficult and complex challenge we’ve ever undertaken,’’ Dan Sperling, professor of civil engineering and environmental science at the University of California, Davis and a member of California’s Air Resources Board, told Bloomberg. “We’re trying to change the entire freight system.’’

California is on the frontlines in the battle over automation as the ports of Long Beach, Los Angeles and Oakland handle 40 percent of U.S. container traffic and that number is expected to increase with the expansion of the Panama Canal.

Advocates for automation argue that ports run basically by robots can handle the greater volume of goods expected to go through the state’s ports and do it more efficiently and in a tighter space.

TraPac LLC, which operates a shipping terminal at the Port of Los Angeles, says the company’s fully automated terminal in Southern California has not only doubled the speed of loading and unloading ships – saving TraPac money and boosting its profit margin – but it has also cut down on the time trucks have to wait for containers. Adding to this is the electric- and hybrid-powered automated machines cut down on carbon emissions – something that California Gov. Jerry Brown is particularly keen to do.

Brown wants 100,000 zero-emission freight-hauling machines in California by 2030 and with half the state’s toxic diesel-soot emissions and 45 percent of the nitrogen oxide that plague Los Angeles with the nation’s worst smog coming from commercial shipment, the Democratic governor has honed in on the ports as the place to start working on his goal.

While this may be music to the ears of environmentalists and shipping industry insiders hoping that the U.S. catches up with the rest of the world (the Port of Rotterdam automated in 1993), it has hit a sour note with the region’s longshoremen, many of whom earn six-figure incomes under the current system.

“Those robots represent hundreds of (lost) jobs,” Bobby Olvera Jr., president of International Longshore and Warehouse Union Local 13, told the Press-Telegram. “It means hundreds of people that aren’t shopping. They aren’t paying taxes and they aren’t buying homes.”

This sentiment – which is echoed across the country on factory floors and warehouses – is not without precedent.

When container shipping was first introduced in the U.S. around the middle of the last century, more than 90 percent of workers at urban docks lost their jobs within 15 years of containerization’s arrival – a trend that greatly contributed to the decline of the urban middle class in port cities across the globe.

In a more recent example, at the ports of Los Angeles and Long Beach the International Longshore and Warehouse Union formally accepted the use of self-driving and automated technologies in 2008. Since then, while none of the unions 14,000 workers have lost their jobs, 10,000 contingent workers have been called up to work much less often, Jim McKenna, president of the Pacific Maritime Association, said.

The push for full automation has been much stronger on the West Coast than at ports in the East and Gulf Coasts, where operators and unions have come to a tacit agreement on partial automation. While ports in Virginia and New Jersey were the first to try out full automation, major stops like Miami and New York seem less likely to do so anytime soon given the pushback from unions and the fact that large ships rarely unload all of their cargo on a single stop like they do out west.

“We have no problem with semi-automated terminals,” Jim McNamara, a spokesperson for the International Longshoremen’s Association, told Fox News. “New technology is fine if it keeps our workers safe, but full automation means that our jobs are gone.”

McNamara added: “Not only do our jobs help the economy and keep more people working, but it would also take years and a lot of money to rebuild a port to be fully automated.”

The high cost, however, is something that terminal owners seem willing to handle if it means bigger profits and to keep pace with global competitors.

The Port of Los Angeles and TraPac have already invested $693 million in four dozen self-driving cranes and automated carriers, plus related infrastructure. Middle Harbor, the port of Long Beach’s automated terminal, should be up and running in about two years at a cost of $1.3 billion.

Experts say that these developments mean that the writing is on the wall for longshoremen and that the automation tide is upon U.S. ports whether they are ready or not.

“The maritime industry has perhaps been slower than most to embrace container terminal automation,” Howard Wren, director of Logistics at Australia’s Jade Software Corp., wrote in article for Port Technology.” “However, confidence in automation technology is now at its highest level ever and the development of automated terminals is quickly approaching the point where the rush is about to begin.”