JAKARTA (Reuters) - Indonesia expects to strike an agreement this month to allow Freeport McMoRan Inc (>> Freeport-McMoran) to keep operating its huge copper mine in Papua in the coming decades, the country's mining and energy minister said on Tuesday.

The U.S. mining giant has been locked in a lengthy dispute with the government over the rights to mine at Grasberg, the world's second-biggest copper mine, costing both sides hundreds of millions of dollars.

"I expect to have a conclusion this month," Minister for Energy and Mineral Resources Ignasius Jonan said in an interview with Reuters, when asked about the status of the negotiations.

Last month, Freeport Chief Executive Richard Adkerson also said he was confident about reaching a deal on a special mining permit before October when the company's temporary permit allowing copper exports is due to expire.

Jonan said that once an agreement was finalised, Freeport would be allowed to apply for two 10-year permit extensions to mine at Grasberg beyond 2021.

Revised rules in Indonesia require miners to divest a 51 percent stake, relinquish arbitration rights and pay new taxes and royalties. Freeport insists on getting the same fiscal and legal protection as in its current contract.

Asked if Freeport had accepted the 51 percent divestment, Jonan said: "Well if they don't, they can go. We don't negotiate that."

Relations between the sides hit a low earlier this year when Freeport said talks were at an "impasse" and warned it could take the dispute to arbitration and seek damages. The government responded by warning it could also take the matter to court.

Jonan said while there was scope to negotiate on issues such as royalties and tax as well as contributions to the Papuan government, stipulations such as the amount of the divestment and a requirement to build a second smelter were sacrosanct.

"We will listen. We will accommodate as much as we can, but we cannot accommodate something that is clearly written in the law," he said.

Freeport Indonesia spokesman Riza Pratama said on Monday that negotiations with the government were ongoing, including on the compulsory divestment of a majority stake.

"(The) four issues in the negotiations are one package deal. Divestment is one of the four issues," Pratama said.

Fair valuation for the divestment, a sticking point in the past, could be resolved by a listing on the Indonesia Stock Exchange, Freeport's Adkerson said last month. Adkerson is personally involved in the negotiations.

Jonan said a stock listing was an option and that a negotiating team for the divestment would be formed to execute this and financial advisers would likely be appointed.

"The issue we now discuss is how to execute to give stability to the operations of Freeport," he said, adding that the negotiations could be a test case for other companies whose contracts of work were expiring.

On the issue of taxes and royalties, Jonan said he expected Freeport and the finance ministry to hold joint talks before the end of August.

Following restrictions related to the export permit dispute, Freeport Indonesia, which employs more than 32,000 staff and contractors, furloughed about 3,000 workers earlier this year. This prompted a strike and high levels of absenteeism, as well as a violent demonstration this weekend.

Asked about whether he was concerned the unrest could escalate in Papua, he said: "I don't think so ... it's an internal labour issue inside Freeport's operations."

(Editing by Christian Schmollinger)

By Ed Davies

Stocks treated in this article : Freeport-McMoran, Rio Tinto Limited, Rio Tinto