WASHINGTON — Retailers and apparel brands invested significantly in inventory for back-to-school, as evidenced by a year-over-year increase of 4.5 percent in textile and apparel imports to the U.S. in July following several months of declines, according to a report from the Commerce Department’s Office of Textiles and Apparel on Tuesday.

Combined apparel and textile imports to the U.S. rose to 5 billion square meter equivalents in July compared to a year earlier, with apparel imports up 3.7 percent to 2.3 billion SME and textile shipments increasing 5.3 percent to 2.7 billion SME.

While the majority of the year-over-year increase in apparel imports was bulking up for b-t-s inventories, some industry officials said companies worried about potential port strikes on the East and West coasts rushed to stockpile holiday inventory to avoid getting caught in a port lockout. Contract negotiations between labor and management in both regions have been contentious. West Coast dock workers have been operating without a contract for more than a year, while the East Coast contract expires on Sept. 30.

“Most of it is back-to-school,” said Nate Herman, vice president of international trade at the American Apparel & Footwear Association. “But the fact they have been bringing in a lot less apparel for the previous six months has led them to bring in a lot of inventory now. People are also trying to push up [holiday] orders ahead of a potential port strike on the East and West coasts.”

Herman said there are not a lot of “positives” in the numbers, however, noted that the year-to-date apparel imports were down 2.9 percent.

Apparel and textile imports from China, the top supplier to the U.S., rose 4.5 percent to 2.5 billion SME in July compared with a year earlier. Apparel shipments edged up 1.1 percent to 1 billion SME, while textile shipments increased 7 percent to 1.48 billion SME.

Combined shipments from Vietnam, which has been taking share away from China, were up 4 percent to 278 million SME in July compared with July 2011. Apparel imports, of which Vietnam is the second-largest supplier to the U.S., jumped up dramatically by 23 percent to 206 million SME.

Many countries benefited from the uptick in apparel orders placed for the b-t-s season, including Bangladesh, which had a 21.5 percent increase in apparel imports to 143 million SME; Indonesia, which posted an 18.3 percent increase in imports to 119 million SME, and Cambodia, which had a 5 percent gain to 87 million SME.

Eight of the top 10 countries posted an increase in combined textile and apparel shipments, including China, India (10.2 percent), Vietnam, Pakistan (0.8 percent), Indonesia (13.5 percent), Bangladesh (23.7 percent), South Korea (24.7 percent) and Honduras (1 percent).

The overall trade deficit in July widened to $42 billion from a revised $41.9 billion in June, as a decline in exports offsets a smaller decline in imports.

Gregory Daco, principal U.S. economist at IHS Global Insight, said consumer goods imports rebounded after three consecutive months of declines. On the export side, however, demand for U.S. consumer goods exports weakened.

“July’s export reading is consistent with the observed global slowdown,” Daco said. “The U.S. exported less to its North American partners [Canada and Mexico], less to Europe and less to China.”