DETROIT - General Motors (GM) says it has halted operations in Venezuela after authorities seized a factory.

The plant was confiscated on Wednesday in what GM called an illegal judicial seizure of its assets.

The Detroit automaker says in a statement Thursday that other assets such as vehicles were taken from the plant, causing irreparable damage.

Get Breaking News Delivered to Your Inbox

GM says the plant was taken in disregard of its right to due process. The company says it will defend itself legally, and it’s confident that justice eventually will prevail.

GM has about 2,700 workers in the troubled country, where it’s been the market leader for over 35 years. It also has 79 dealers that employ 3,900 people, and its parts suppliers make up more than half of Venezuela’s auto parts market, the company said.

Venezuela has been rocked in recent days by violent protests of government policies as well as food shortages and triple-digit inflation.

If the government permits it, workers will get separation benefits “arising from the termination of employment relationships due to causes beyond the parties’ control,” the GM statement said.

Dealers will continue to service vehicles and provide parts, the company said.

Companies have been cutting operations in Venezuela as a result of runaway inflation and strict currency controls. Last May, tire maker Bridgestone sold its business there after six decades of operating in the country.

Bridgestone joined other foreign multinationals including Halliburton, Ford Motor and Procter & Gamble who have either slowed or abandoned their investments in Venezuela.

GM’s Venezuelan operations have been a drag on earnings for several years. In the second quarter of 2015, the company took a $720 million charge for currency devaluation and asset valuation write-downs as the economy faltered.

The carmaker’s South American operations, which include Venezuela, account for a relatively small portion of its earnings and sales. Last year GM lost $400 million before taxes in South America, but as a whole the company made a pretax profit of $12.5 billion. GM sold just over 583,000 vehicles in the region last year, but that was only about 6 percent of its total sales.

In its 2016 fourth-quarter earnings release, the company said that its South America region “remains challenged from macro-economic and political standpoints.”

GM shares rose slightly in premarket trading.