Heineken NV, the World’s second-largest beer maker, is considering closing two factories in North-eastern Brazil, the company said on Friday in a statement.

“This is as an extreme measure after a court ordered the company to sell beer and soft drinks in the region at a money-losing price.

“Heineken is in a court dispute with Grupo LGH referring to the prices to sell its portfolio in the states of Pernambuco and Paraiba,’’ the statement said.

“A court decision mandates Heineken to sell beer and soft drinks below cost to a local distributor.

“Due to these distortions, Heineken is reviewing its strategy in the northeast and considers extreme measures such as the closure of the factories.

“Two factories that might close are in the states of Bahia and Pernambuco,’’ the company said.

It gave no details about the product mix at those factories.

Since Heineken’s 1.2 billion dollar purchase in 2017 of the money-losing Brazil operations of Japan’s Kirin Holdings Co. Ltd., the brewer operates 15 factories in the country.

It cut its full-year margin forecasts in the first half due to currency weakness in some more profitable markets and expansion in Brazil.

A newspaper, Valor Economico, reported that the closure was being considered because the court decision resulted in an accumulated loss of 23.4 million dollars in 2017.