MELBOURNE, July 17 (Reuters) - Papua New Guinea Prime Minister James Marape said his government would be willing to work with Barrick Gold Corp to reopen the Porgera gold mine if the Canadian company withdraws its court action against the state.

Barrick stopped production at Porgera and sued the Papua New Guinea (PNG) government after it refused to extend the mine's expired lease in April because of community unrest and pollution concerns.

"If they (Barrick) withdraw the court cases, we can talk commercial with them," Marape said in a statement on his Facebook page posted on Thursday.

He said the government has indicated to Barrick that "they will be given first consideration for partnership, but under new terms".

A spokesman for the Porgera Joint Venture, in which Barrick and China's Zijin Mining Group each own 47.5%, said they will issue a statement on Marape's offer later.

Marape's statement came after Barrick, which operates Porgera, said it would reduce power supply to townships near the mine, which it supplies for free, from Friday to save costs.

Barrick last week approached the World Bank's International Centre to try to settle the dispute, while moving ahead with the judicial review in PNG.

The dispute over the mine lease comes at the same time as Marape is holding up other major mining and gas projects to get better terms for the country from foreign investors, even as the country suffers a major economic slump.

(Reporting by Sonali Paul; Editing by Christian Schmollinger)