* Mediation deal comes after all-night bargaining session
* Eighteen ships diverted to other ports since strike began
* Union spokesman says L.A. mayor helped narrow differences
By Steve Gorman
LOS ANGELES, Dec 4 Striking harbor clerks and management at the twin ports of Los Angeles and Long Beach agreed to federal mediation on Tuesday in a bid to end a week-old labor clash that has idled most of America's biggest cargo shipping complex.
The agreement to mediation, announced by Los Angeles Mayor Antonio Villaraigosa, came after an all-night bargaining session that a spokesman for the Harbor Employers Association, representing shippers and terminal operators, said had left the parties "still far apart."
But a union spokesman said the opposing sides had "made incredible progress," and he credited the mayor with helping contract negotiators narrow their differences.
The spokesman, Craig Merrilees of the International Longshore and Warehouse Workers Local 63, said a new round of talks would begin once the mediator arrives later in the day.
With mounting economic losses estimated at several billion dollars, the strike marks the largest cargo traffic disruption at the Southern California harbor facilities since a 10-day lockout of longshoremen at several West Coast ports in 2002.
The latest strike has prompted at least 18 freighters to change course and take their cargo to other ports in Northern California, Mexico and Panama, according to the non-profit Maritime Exchange of Southern California, which tracks shipping in the region. Seven of those diversions occurred on Monday.
An additional 13 ships were waiting at anchorages outside the Los Angeles-Long Beach complex on Tuesday, unable to unload their cargo, said Dick McKenna, executive director of the Maritime Exchange.
The two sides in the strike have deadlocked over future staffing levels and union representation for jobs lost to retirement and other attrition.
The 800-member clerical workers unit of the ILWU local walked off the job last Tuesday, with some 10,000 longshoremen and other union members refusing to cross picket lines, forcing a shutdown at 10 of the twin ports' 14 container terminals.
Four other container terminals remained open, along with facilities for handling shipments of automobiles, liquid fuels and break-bulk cargo such as raw steel.
Unlike the labor clash at ports a decade ago, which took place in the fall, the latest dispute is unfolding after the busy pre-holiday shipping season, limiting the scope of its ripple effect.
A number of major U.S. retailers said they have so far been largely unaffected by the strike because most of their Christmastime inventory has already made it to store shelves.
OBAMA 'MONITORING' STRIKE
But the National Retail Federation asked President Barack Obama last week to intervene, warning that a prolonged strike could have a "devastating impact on the U.S. economy."
White House spokesman Jay Carney said on Monday that Obama was "monitoring the situation" and had urged the opposing sides to remain at the bargaining table.
ILWU leaders say they are demanding that jobs traditionally performed by their members remain classified as union work and subject to the union's contract terms, even after employees holding them retire. They accuse management of seeking to outsource jobs to workers elsewhere for less pay.
The employers insist on reserving the right to fill only those jobs that need to be filled, and they accuse the union of seeking to set staffing at artificially high levels.
Harbor employers spokesman Steve Getzug said the two sides agreed to mediation after a marathon bargaining session that ran from Monday evening until nearly 8 a.m. on Tuesday.
Getzug said Villaraigosa met on Monday night with the two sides together and separately, and was in the room when the employers presented their most recent proposal, but that after the all-night session, "we're still far apart."
"It's always been in the employers' interest to find a way forward in these negotiations because the union continues to refuse to meet us halfway on our core staffing issues," he said.
Union spokesman Merrilees gave a more upbeat assessment, saying, "The mayor helped close the gap, and hopefully the resolution can be reached."
"The fact is a few days ago it was hard to even talk about outsourcing problems with the company," he told Reuters. "We're now talking about nitty-gritty details of a solution to ensure those jobs stay here in the community and don't keep disappearing to other states."
The most immediate casualties of the strike so far have been tens of thousands of longshoremen, truckers, warehouse workers and others left idle in the commercial transportation sector of Southern California, a region struggling to recover from a prolonged economic slump.
The overall economic impact has been estimated at more than $1 billion a day, including lost wages and the value of cargo rerouted away from the two ports, which together accounted for nearly 40 percent of all U.S. cargo container imports last year.
Terminal operators worry about permanently losing business as some cargo is diverted to competing ports.
The ports of Los Angeles and Long Beach together handled more than $400 billion in goods arriving or leaving the West Coast by ship last year. Experts say the ports directly or indirectly support some 1.2 million Southern California jobs - workers involved in moving freight to or from the shipping complex.
WORLD NEWS SCHEDULE AT 1800 GMT/2 PM ET
Iraqi forces free hundreds of civilians in Mosul Old City battles as death toll mounts