The Environment Ministry lodged the case earlier this year against PT Newmont Minahasa Raya, seeking damages for alleged pollution of a bay in the eastern Indonesian region of Sulawesi. The ruling does not affect a separate criminal trial of the local unit and its American chief that is expected to run until next year. The controversial pollution row is being closely watched by foreign investors and environmentalists.
"The court grants the defendant's exception that the South Jakarta district court does not have the authority to handle the case," presiding judge Soedarto said.
Prosecutors said they would appeal. Newmont welcomed the ruling and said it would continue to try to reach an out-of-court settlement with the Environment Ministry over the civil matter.
"We are very pleased that the panel of judges has appreciated and reflected on the government's commitment toward our company to settle this dispute through conciliation or arbitration," said Rubi Purnomo, a Newmont spokesman in Jakarta.
The criminal and civil cases both relate to Newmont Minahasa Raya's disposal of waste from a gold mine near Buyat Bay, 2,200 km (1,400 miles) northeast of Jakarta. The mine opened in 1996 and closed in August 2004 due to depleted reserves.
Prosecutors allege the waste disposal process involved dumping mercury and arsenic into the bay, making villagers sick as a consequence.
Newmont has vigorously denied any wrongdoing and said its disposal processes were properly approved by the government.
The saga is being watched closely by business groups, some of whom have criticised the government's pursuit of the firm as unduly harsh and likely to discourage investment in Indonesia.
Environmental groups say the case shows Jakarta is willing to get tough with polluters.
In the criminal trial taking place in Sulawesi, Newmont Minahasa Raya President Director Richard Ness, a 55-year-old from Minnesota, could face a jail sentence of up to 10 years and be fined around $68,000 if convicted.
A government-commissioned probe and a police study have concluded that the bay was polluted, but several other studies, including one by the World Health Organisation and the Indonesian Health Ministry, did not support that charge.
Newmont's operations in Indonesia accounted for 6 percent of its global sales in 2004. The Denver-based company operates Asia's second-largest copper mine, Batu Hijau, on eastern Sumbawa island.