The U.S. Department of Commerce started an investigation into automobile imports to determine whether they "threaten to impair the national security" of the United States, the agency said in a statement on Wednesday night local time. The surprise announcement comes at a time of worsening friction over trade between the United States and other countries — including close allies — with tariffs, threats of tariffs and complaints with the World Trade Organization flying back and forth. The new U.S. probe will be carried out under Section 232 of the Trade Expansion Act of 1962. That section of the law authorizes the secretary of Commerce to determine "the effects of imports of any article on the national security of the United States."

Porsche cars destined for export stand at Bremerhaven port on March 19, 2018 in Bremerhaven, Germany. Alexander Koerner/Getty Images

The United States carries out a brisk trade in automobile exports and imports, primarily with traditionally friendly countries including Japan, Germany and South Korea. U.S.-based automakers and auto parts makers also manufacture products in Mexico and Canada and then import them into the United States. "I wonder how much this has got to do ... with Mexico and Canada," John Woods, CIO of Credit Suisse, told CNBC's Bernie Lo. "I suspect there is some leverage going on" that's designed to increase pressure on those countries as they try to renegotiate the North American Free Trade Agreement with the United States.

Japanese and Korean shares take a hit

'Weaken the internal economy'