Union dockworkers at all 29 U.S. West Coast ports have voted overwhelmingly to ratify a contract agreement reached in February with shipping companies and terminal operators to end months of labor strife that snarled trans-Pacific trade. Members of the International Longshore and Warehouse Union voted 82 percent in favor of the new five-year labor pact, which runs through June 2019, the union said in announcing the final tally of balloting that took place during the past month. The companies on the other side of the negotiating table, represented by the Pacific Maritime Association, likewise voted to ratify the labor deal on Tuesday. Final approval, which had been expected, came three months after negotiators for the two sides reached a tentative settlement with the help of a federal mediator and U.S. Labor Secretary Thomas Perez. Perez was sent to California as an emissary of President Barack Obama, who had come under mounting political pressure to intervene in a conflict that by some estimates could have ended up costing the U.S. economy billions of dollars. The deal reached included revisions to the arbitration system for resolving workplace disputes under the contract, a key point of contention that delayed an agreement in the final weeks of talks. Terms of the deal, which were not publicly disclosed, are retroactive to July 2014. “The negotiations for this contract were some of the longest and most difficult in our recent history,” union president Robert McEllrath said in a statement. Tensions arising from the negotiations had played out in months of chronic cargo backups that increasingly slowed freight traffic at ports handling nearly half of all U.S. maritime trade and more than 70 percent of the nation’s imports from Asia. The slowdowns, blamed by each side on the other as pressure tactics during the talks, reverberated through the U.S. commercial supply chain, extending to agriculture, manufacturing, retail and transportation. The gridlock was most keenly felt at the twin ports of Los Angeles and Long Beach, the two busiest container-cargo hubs in the United States. At the height of the disruption, cargo loads faced lag times of two weeks or more and dozens of inbound freighters were anchored along the West Coast, waiting for berths to open. Cargo traffic was reported to be returning to normal in recent weeks as the ports worked to clear out the backlog.