The largest U.S. cargo shipping complex resumed full operations after harbor clerks and management settled an eight-day strike that left two Southern California ports mostly idle, sapping the region's economy of an estimated $8 billion.

The strike at the neighboring ports of Los Angeles and Long Beach ended when clerks in the International Longshore and Warehouse Union Local 63 reached a tentative contract deal with a group of shippers and terminal operators. Los Angeles Mayor Antonio Villaraigosa, a onetime labor activist, had joined in to prod the two sides into an agreement.

"Everyone is back to work and it's business as usual," said John Fageaux, a spokesman for the ILWU.

Terminals gates opened at 7 a.m. local time (1500 GMT) and cranes began unloading cargo crates from ships an hour later, said Philip Sanfield, a spokesman for the Port of Los Angeles. Between 5,000 and 10,000 workers are expected to clock in on Wednesday at the port complex, he added. At one point, 13 ships were anchored offshore because of the shutdown.

About 800 clerical employees walked off the job Nov. 26 over a dispute with management about the outsourcing of jobs. About 10,000 longshoremen refused to cross their picket lines, according to Fageaux.

The settlement was reached not long after federal mediators, called upon to join negotiations at the mayor's behest, showed up on Tuesday at the waterfront community center where talks were being held. Villaraigosa announced the agreement.

"Today, the ILWU voted to approve the contract," Villaraigosa said, standing with smiling members of both negotiating teams.

Union officials said they expected members, who have been without a contract for more than two years, to ratify the new contract.

Details of the pact were not immediately made public. But the mayor and ILWU representatives said the two sides had come to terms on the union's chief concern - control over outsourcing, or the transfer of jobs to workers elsewhere for less pay.

What direct role, if any, the mediators played in clinching the deal was unclear. But Villaraigosa said a key breakthrough came when the union, which had resisted outside intervention, joined management on Tuesday morning in consenting to mediation as a way of spurring the stalled talks.

The union credited the mayor with helping the parties narrow their differences during a marathon bargaining session.

"I am pleased with it," said Fageaux, "We didn't get everything that we wanted and neither did the employer. It's fair and it's a contract we can both be happy with."

$1 Billion a Day

The strike cost Southern California, a region still struggling to recover from a prolonged economic slump, an estimated $1 billion a day, including lost wages and the value of cargo rerouted to other ports, the mayor said.

The National Retail Federation, which had warned that a prolonged strike could have a "devastating impact on the U.S. economy," welcomed the settlement.

"Retailers have cargo that has been stuck at the port that has to get out for last minute holiday merchandise," said Jonathan Gold, vice president of supply chain and customers policy for the NRF. "This is much bigger than just hitting retailers. It impacts manufacturers, farmers and others involved in the logistics industry."

The shutdown marked the worst cargo traffic disruption at Los Angeles and Long Beach - which together account for nearly 40 percent of all U.S. container imports - since a 10-day lockout of longshoremen at several West Coast ports in 2002.

The latest dispute forced 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.

Still, at least 18 freighters bound for Los Angles and Long Beach during the strike changed course to take their cargo to ports in Northern California, Mexico and Panama, according to the non-profit Maritime Exchange of Southern California. The diverted