Increased consumer demand and the diversion of cargo from the West Coast sent container traffic at the Port of New York and New Jersey soaring to an all-time high from January through June, port officials said today.

The Port Authority of New York and New Jersey, which runs the port, said the record represented a 4 percent increase in container traffic over the first half of 2013.

The Port of New York and New Jersey takes in the shipping terminals situated in Newark, Elizabeth, Jersey City, Bayonne, Staten Island and Brooklyn.

A spokeswoman for the Port Authority, Lenis Rodrigues, said the increase in volume was attributed in part to improving economic conditions that spurred rising consumer demand. Another factor, Rodrigues said, was a contract dispute between longshoremen and shippers on the West Coast, which prompted some importers to divert cargo through the Panama Canal to the East Coast.

"So we're seeing some diversion to our port," Rodrigues said.

From January through June of this year, the port handled 1,583,449 containers, up from 1,523,273 during the first six months of 2013, and a 35,000-container increase above the six-month record set in 2012.

Volume of containerized cargo is typically measured in twenty-foot equivalency units, or TEU's since cargo is shipped in 20-foot and in 40-foot containers.

Rodrigues said the first-half record was for the number of containers passing through the port regardless of size, a figure known as "lifts." She said the number of lifts was used in the announcement because it is viewed as a simpler figure to grasp.

The volume for the first half of 2014 was the port's best ever, with the 2,727,554 TEU's, and 4 percent above the 2,621,161 TEU's handled in the first six months of 2013.

Even accounting for positive factors like the economy and West Coast diversions, port officials said the record volume was notable in that it was achieved despite harsh winter weather that occasionally slowed and even shut down port operations this year.

"The problems we experienced last winter with moving cargo containers on and off the docks taught us a very important lesson – that all stakeholders must work together for the benefit of the entire port community," the agency's port commerce director, Richard Larrabee, said in a statement. Larrabee co-chairs an agency-stakeholder task force created last fall to maximize port efficiency.

The Port Authority's deputy executive director, Deborah Gramiccioni, said investments by the agency were paying off in increased volume.

The investments include $600 million over several years to create and expand the port's ExpressRail system, which allows containers to be transported in and out of terminals on trains instead of trucks.

ExpressRail, which is financed by a surcharge on all containers passing through the port by train or truck, saw a 5 percent increase for the first half of the year, and the system now handles for just over 14 percent of total container volume. Officials say the rail network helps reduce port congestion and emissions linked to truck traffic.