Mini-major Filmax Entertainment has filed with a Barcelona court seeking protection from creditors.

Filmax has requested four months to restructure debt, avoiding a formal suspension of payments and the imposition of an administrator controlling its future.

The Barcelona-based shingle is Catalonia’s best-known film company, behind the production and international sales of pics including “The Machinist,” “REC” and “REC2.”

It clinched a $20 million-$26.8 million debt financing agreement last April, syndicated by Spanish savings bank Caja Madrid.

“Where we’re having difficulties is in local distribution, caused by piracy, which has decimated DVD sales, and the credit crunch,” Filmax prexy Carlos Fernandez said. “We don’t have cash flow problems in production, international sales, exhibition or services.”

Also, TV sales have slowed on foreign films acquired for distribution in Spain.

Filmax invested more than $540 million, principally in Spanish distribution rights, and is now faced with a distribution downturn that is forcing it to write down $54 million a year, Fernandez added.

Filmax will now negotiate a debt restructuring plan with Spanish financial institutions and banks. Some of these — savings banks Caixa Galicia and Caixa Laietana, the Catalan Finance Institute — sit on Filmax’s board as minority shareholders.

Filmax’s assets include rights to more than 2,000 titles and a healthy international sales operation, driven by third-party pickups such as Berlin hit “Agnosia.”Having seen Antonio Llorens’ Lauren Films reduced to a shadow of its former self after suspending payments in 2004, the Catalan government will not want another iconic local film company go under.

The big question is whether Spanish financial institutions will buy into Filmax’s restructuring plans or dismantle the company.