General Motors says it will immediately halt operations in Venezuela after its plant in the country was unexpectedly seized by authorities.

GM (GM) described the takeover as an "illegal judicial seizure of its assets."

The automaker said the seizure showed a "total disregard" of its legal rights. It said that authorities had removed assets including cars from company facilities.

"[GM] strongly rejects the arbitrary measures taken by the authorities and will vigorously take all legal actions, within and outside of Venezuela, to defend its rights," it said in a statement.

Authorities in Venezuela, which is mired in a severe economic crisis, did not respond to requests for comment.

It was not immediately clear why authorities seized the GM plant. Huge swaths of Venezuela's economy have been nationalized in the years since former President Hugo Chavez rose to power. Under Chavez, who took office in 1999, the state took control of private oil, telecommunications, energy and cement businesses.

President Nicolas Maduro has continued the tradition, while blaming the United States and its companies for Venezuela's economic and political problems.

"Government decision making is increasingly incoherent. It's difficult to understand the rationale," said Nicolas Watson, head of Latin American research at Teneo Intelligence.

Automakers in the country have struggled because they've been unable to access U.S. dollars to import parts, said Watson.

The GM plant in Valencia employs nearly 2,700 workers, but stopped producing cars in 2015 and has only been selling spare parts since then, a company spokesperson said.

GM said it would make "separation payments" to its workers.

Venezuela is in crisis mode: The country's economy shrank by 18% in 2016 -- its third consecutive year of recession. Unemployment is set to surpass 25%, and its people have suffered from widespread shortages of food and medicine.

Hyperinflation has wiped out the value of its currency, the bolivar. The price of consumer goods has skyrocketed.

Large-scale protests erupted in recent weeks after Maduro's administration barred opposition leader Henrique Capriles from holding political office for the next 15 years. At least nine people have been killed in the protests.

Maduro has been accused by the opposition of behaving like a dictator.

In late March, the loyalist-backed Supreme Court tried to strip the opposition-led National Assembly of its powers, but quickly reversed course after a severe public outcry. The Supreme Court also blocked all reforms from opposition lawmakers.

Related: As protests swell, Venezuela spirals into 'deep economic crisis'

A slew of global firms have pulled out of the country or been forced to halt operations as a result of government interference or moves to put key sectors of the economy under state control.

ExxonMobil (XOM) pulled the plug on its operations in Venezuela in 2007 after former President Hugo Chavez attempted to nationalize one of its projects. The oil producer then took the government to court.

In 2016, Kleenex maker Kimberly-Clark (KMB) suspended its operations in Venezuela, citing the country's "rapidly escalating inflation" and the "continued deterioration of economic and business conditions."

The government called the closure illegal. It took over operations at the facility days later, according to state-run media.

Related: GM isn't the only company under siege in Venezuela

Coca-Cola (KO) was also forced to halt production of Coke and other sugar-sweetened beverages last year due to a sugar shortage.

-- Marilia Brocchetto and Ana Melgar contributed to this report.