A pesky insect known as the "stink bug" is preventing thousands of Japanese cars from being delivered to New Zealand.

Three cargo ships carrying imported cars and machinery were refused entry at New Zealand ports this month after they were found to have hordes of the bugs aboard, according to New Zealand authorities.

Stink bugs are a major threat in New Zealand, a remote island nation that goes to great lengths to protect its natural ecosystem from foreign pests.

The critters could wreak havoc across the country's farms. They tend to reproduce quickly, eat a broad variety of crops and resist most pesticides.

Protecting agriculture and the environment is coming at a cost to the auto industry. The three ships from Japan that were refused entry were carrying more than 10,000 new and used cars, according to David Vinsen, CEO of New Zealand's Imported Motor Vehicle Industry Association.

"In my 15 years in this role, and probably 30 years involved in this industry, I have not seen anything which is as serious as this," said Vinsen, who flew home early from a family vacation to deal with the crisis.

The delays aren't just affecting the cars stuck out at sea. As many as 8,000 more vehicles are still awaiting shipment in Japan, Vinsen added.

Related: 3-way fight for global auto sales crown

New Zealand's Ministry for Primary Industries said Tuesday that the country has experienced "an unprecedented spike in the number of stink bugs arriving," particularly from Japan.

It's not clear exactly how the contamination happened. The ships were carrying thousands of new and used vehicles "of every Japanese make and model," Vinsen told CNNMoney. Japan's biggest carmakers are Toyota (TM), Nissan (NSANF) and Honda (HMC).

He said the problems have already disrupted his industry for more than a week, forcing workers who typically help process the vehicles "to take early holidays" or have their working hours cut back.

"People are concerned about their jobs," he said. "So we need to get this matter resolved as quickly as possible."

If the situation isn't resolved soon, employers will start imposing temporary lay-offs "in a matter of weeks, rather than months," he warned.

New Zealand stopped manufacturing cars in the late 1990s and now relies on imports from other countries. Japan was its biggest supplier of auto vehicles and parts in the year through June 2017, with sales worth $1.7 billion.

Japanese car shipments have brought the threat of pests before. For example, eggs of the Asian gypsy moth, another potentially destructive insect, were found on imported vehicles from Japan in 2012.

Importers and government officials are now scrambling to get the cargo moving again.

Related: Investment in the British car industry is plummeting

Authorities will try treating one of the affected ships this week to get rid of the bugs before determining whether its cargo can enter New Zealand, a spokesperson from the Ministry for Primary Industries told CNNMoney.

The stink bug crisis has already prompted the New Zealand government to introduce new rules.

On Tuesday, it said it would start requiring all used vehicles from Japan to be cleaned and inspected at an approved facility before being shipped to New Zealand. Exporters of used machinery from Japan will have to prove their equipment has been adequately cleaned as well.

"Nearly 95% of used vehicles from Japan already go through approved facilities," the Ministry for Primary Industries said. "The requirement will now be compulsory for all imports."

Vinsen acknowledged that the safety of New Zealand's huge farming industry must come first. It accounts for three of the country's top five goods exports: fruit, dairy and meat.

"Biosecurity is absolutely paramount to us," said Vinsen. "We need to do whatever we need to do to make sure that we're not exposing any of our agricultural industries to this sort of risk."