Indonesian search and rescue teams have found three bodies as they try to find more than two dozen workers trapped in a mine in West Java. 

Crews have been pumping water out of the open-pit mine after heavy rain caused a river near the operation to overflow, flooding it on Monday, local time. 

The three bodies were recovered about midday on Wednesday, 30 to 40 metres into the mine. 

a man with a red helmet walks through thick jungle

Rescuers have so far found three bodies in the mine.  (Supplied: Basarnas)

The search continues for 23 more miners believed to be trapped inside. 

Eleven miners left the mine safely before waters flooded the shaft on Monday, police said.

The 100-metre-deep open-pit gold mine in Java’s Bogor district was flooded when a nearby river overflowed after a torrential downpour.

“We are coordinating with all joint SAR elements to monitor water conditions and assess access to the pit,” said Desiana Kartika Bahari, head of the Jakarta search and rescue (SAR) office.

“The depth of the pit, narrow access and minimal lighting are considerations in determining search steps to ensure personnel can work safely.”

a min climbs down a ladder into the ground

Police said 11 miners left the mine before water flooded the shaft. (Supplied: Basarnas)

State miner Antam, which operates gold mining operations in Pongkor, said the incident happened at an unauthorised gold mine and was not part of its operations.

Small-scale and illegal mining has often caused accidents in resource-rich Indonesia, where mineral resources are located in remote areas in conditions difficult for authorities to regulate.

ABC/Wires