* New Grasberg mining permit valid to July 31
* Talks ongoing between Freeport, Inalum, environment ministry
* Environmental issues are now main unresolved area -official (Adds comment from companies)
JAKARTA, July 4 (Reuters) - Indonesia has extended a temporary operating permit for Freeport McMoRan Inc's Grasberg project, the world's second-biggest copper mine, until the end of the month while discussions continue over long-term rights.
Freeport's local unit, PT Freeport Indonesia (PTFI), has been given a temporary operating permit for Grasberg until July 31, Coal and Minerals Director General Bambang Gatot Ariyono told reporters at a press conference on Wednesday.
Phoenix, Arizona-based Freeport has been in negotiations with Indonesia to secure long-term operating rights at Grasberg after the government introduced new rules last year aimed at giving Jakarta greater control over the nation's resources.
Efforts to finalize a deal have been overshadowed by concerns over the environmental impact of the project in the eastern Indonesian province of Papua.
"This month we hope all of the aspects - the divestment transaction, investment stability guarantees, the environment, a smelter - all of them are resolved," Ariyono said.
Freeport's previous temporary operating permit for Grasberg expired on June 30 after being awarded in January.
Freeport's Grasberg partner Rio Tinto and state-owned mining holding company Inalum are also involved in negotiations on the project, which needs significant investment to develop an underground phase from its current open-pit construction.
Inalum may complete a multi-billion-dollar deal to acquire a majority stake in Grasberg this month, officials said on Saturday, but details on how Freeport will maintain operational control have yet to emerge.
According to Ariyono, the main issues to be resolved were environmental matters, and discussions were ongoing "between the Environment and Forestry Ministry, the Freeport team and Inalum, who have requested an opportunity to resolve them."
Other matters, which include a requirement for Freeport to build a second copper smelter and adopt a new tax regime, "are nearly finalized," he said.
Inalum was trying to reach a deal within two weeks, company spokesman Rendi Witular told Reuters by text message. "Differences in views have narrowed," he said.
A spokesman for Freeport Indonesia did not immediately respond to requests for comment. A Melbourne-based spokesman for Rio Tinto declined to comment.
A 2017 state audit of operations at Grasberg that outlined massive damage from Freeport's mine waste and a lack of proper environmental permits has complicated efforts to wrap up the deal.
In April, following the audit, Indonesia's environment minister issued two decrees that gave Freeport six months to overhaul management of its mine waste.
Freeport's average daily copper ore production at Grasberg has been between 175,000 and 176,000 tonnes so far this year, below its 2018 target of 230,000 tonnes, Ariyono said.
The company exported 465,000 tonnes of copper concentrate from February to mid-June, he added.
(Reporting by Wilda Asmarini; Writing by Fergus Jensen; Editing by Christian Schmollinger and Joseph Radford)