The ports on the West Coast are open for business again—and not a moment too soon.

Technically, they never closed, though for months they’ve suffered from a work slowdown that has sucked billions of dollars from the U.S. economy. Last weekend, employers and union leaders reached a tentative agreement on a new, five-year contract that promises to end the disruption.

I’m glad the ordeal appears to be over, but also annoyed that it ever started. A country that seeks to partake as a reliable partner in global trade shouldn’t fall hostage to a labor dispute.

The first step in the recovery is for both sides to ratify their agreement, which covers 29 ports along the Pacific Ocean, from San Diego in the south to Puget Sound in the north. More than 15 million loaded containers move through these ports each year, and one-eighth of our country’s GDP is connected to this cargo.

In recent months, however, the International Longshore and Warehouse Union ordered its 20,000 members to put the brakes on this activity. Think of it as a slow-motion strike, except that labor leaders were careful never to use that potent word. They knew that an actual strike would have hurt their cause among the public as well as risk triggering the federal Taft-Hartley law, forcing them back to work.

Instead, they used the slowdown to pressure the Pacific Maritime Association, which represents shipping companies and terminal operators, for a new contract, following the expiration of a previous one last summer. In doing so, they took advantage of the 9 million Americans whose jobs depend on West Coast port traffic as well as consumers who are going to see higher prices in stores, even if they don’t quite understand why.

The ILWU’s behavior turns its motto into an ironic slogan: “An injury to one is an injury to all.”

I’m one of the injured parties. As a pistachio grower in California, I rely on West Coast ports. More than 80 percent of my nuts head to foreign markets in Asia and Europe. When exports came to a standstill, however, we had to move our pistachios to ports in Houston and Savannah by road and rail, at great expense.

The good news is that our pistachios left the country. Unlike many agricultural products, they store well. The bad news is that the increased cost of transportation makes us less competitive. Our international rivals delighted in our ports fiasco. The primary beneficiary was Iran, a top producer of pistachios and one of America’s great enemies.

The fate of my pistachios may not seem like much, but it’s symptomatic of a larger problem. Many farmers suffered as their fruits, vegetables, and meats spoiled. “If you talk to the citrus farmers whose citrus rotted on the port, that’s damage that has been done,” observed Secretary of Labor Tom Perez last week.

This makes no sense: Our country suffers a trade imbalance that would be much worse without agricultural exports, and we live in a world cursed by food insecurity and malnutrition. The ports slowdown has been both an economic and humanitarian disaster.

I’m reluctant to get in the middle of an industry’s fight over wages and benefits, but the ILWU’s full-time workers earn $147,000 per year and also receive $82,000 in employer-paid benefits, according to the Wall Street Journal. One of the major differences in their current quarrel with management involves the question of who will pay Obamacare’s “Cadillac tax” on gilded health-care plans, set to take effect in 2018.

So we’re not talking about blue-collar men and women who struggle to earn a living.

Even if the two sides approve their deal, things won’t return to normal for a while, as longshoremen reduce a big backlog of containers ready to enter and leave the country. “U.S. manufacturers, exporters, and retailers face months of continuing supply chain disruption from the after-effects of a simmering labor dispute,” wrote the Financial Times on Sunday.

I’m happy that business is back at the ports. But did it have to vanish in the first place?

Ted Sheely raises lettuce, cotton, tomatoes, onions, wheat, pistachios, wine grapes and garlic on a family farm in the California San Joaquin Valley.  He volunteers as a board member of Truth About Trade & Technology Network (www.truthabouttrade.org). 

Follow us: @TruthAboutTrade and @World_Farmers on Twitter | Truth About Trade & Technology on Facebook.