FILE - This Jan. 25, 2010, file photo, shows a General Motors Co. logo during a news conference in Detroit. General Motors Co. For the third time in eight years, General Motors is recalling cars that can leak oil and catch fire, sometimes damaging garages and houses. The recall, which covers 1.4 million vehicles dating to the 1997 model year, is needed because repairs from the first two didn't work. More than 1,300 cars caught fire after they were fixed by dealers, the company said. (AP Photo/Paul Sancya, File)

DETROIT (AP) — General Motors has stopped doing business in Venezuela after authorities took control of its only factory there in what GM called an illegal judicial seizure of its assets.

The plant was confiscated on Wednesday as anti-government protesters clashed with authorities in a country that is roiling in economic troubles such as food shortages and triple-digit inflation.

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

GM says the plant was taken in disregard of its right to due process. The company says it will defend itself legally and that 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.

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.

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.

South American operations, which include Venezuela, account for a relatively small portion of GM’s earnings and sales. Last year the company 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.”

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.