LOS ANGELES – Work resumed Wednesday at the nation’s busiest port complex after a crippling strike was settled, ending an eight-day walk-off that affected thousands of jobs and billions of dollars in cargo.

Gates at the Los Angeles and Long Beach harbors reopened, and dockworkers were ready to resume loading and unloading ships that had been stuck for days, Los Angeles port spokesman Phillip Sanfield said.

“It’s going to take a few days, maybe a week or two to get back to normal,” Long Beach port spokesman Art Wong said.

Dozens of ships were stuck idle at the complex or delayed on their way in, officials said. Auto parts, retail merchandise for January sales and repair parts for Redbox video kiosks were among the items that could be late in getting to their destinations around the country, Wong said.

Television reports showed huge cargo vessels moving into port, and a line of trucks waiting to enter a terminal.

Clerical workers who said that shippers were outsourcing their jobs struck on Nov. 27 and thousands of dockworkers in the same union refused to cross picket lines, paralyzing much of the port complex that handles 44 percent of all container cargo that arrives by sea nationwide, including items such as cars from Japan and computers from China.

Negotiators reached a tentative agreement to end the strike late Tuesday, two hours after federal mediators arrived from Washington, D.C.

The union said the proposed contract between clerical workers and 14 shipping terminal operators contained new protections against outsourcing of their well-paid jobs out of state and overseas.

The clerks, who make an average base salary of $87,000 a year, have some of the best-paying blue-collar jobs in the nation.

Clerical workers are expected to ratify the deal in the next week or two.

The strike began when 450 members of the ILWU’s local clerical workers unit walked off their jobs.

The walkout quickly closed 10 of the ports’ 14 terminals when some 10,000 dockworkers, members of different unit of the same union, refused to cross picket lines.