FILE PHOTO: Heineken beers are seen on a production line at the Heineken brewery in Jacarei, Brazil June 12, 2018. REUTERS/Paulo Whitaker/File Photo

SAO PAULO (Reuters) - Heineken NV HEIN.AS, the world's second-largest beer maker, is considering closing two factories in northeastern Brazil as "an extreme measure" after a court ordered the company to sell beer and soft drinks in the region at a money-losing price, the company said on Friday in a statement.

“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, the company said.

“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 state of Pernambuco, the statement said. It gave no details about the product mix at those factories.

Since Heineken's $1.2 billion purchase last year of the money-losing Brazil operations of Japan's Kirin Holdings Co Ltd 2503.T, the brewer operates 15 factories in the country.

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

Newspaper Valor Economico reported on Friday the closure was being considered because the court decision resulted in an accumulated loss of 90 million reais ($23.4 million) over the last year.

(This version of the story corrects third paragraph as Heineken corrects its statement to say the two factories it is considering closing are in the state of Pernambuco, deleting reference to Bahia)