Twelve people on board a ferry that sank four days ago in Indonesia's Java Sea were found alive Wednesday after clambering onto an unmanned offshore oil rig, navy officers said.

The survivors, all male, were weak but well and expected to arrive on shore later Wednesday, said Navy spokesman Lt. Col. Tony Syaiful, who monitored the rescue operation just after midnight from land via radio.

Click here for FOXNews.com's Asia Center.

Navy Col. Jan Simamora, the head of the search and rescue mission, confirmed the rescue.

Authorities say 628 people were onboard the ferry when it sank late Friday after being pounded by waves for 10 hours during a violent storm en route from Indonesia's section of Borneo island to the main island of Java.

At least 212 people have been found alive so far, most of them plucked from life rafts or clinging on to debris, but some 400 remain missing in still-heavy seas, Simamora told The Associated Press.

"We are trying our utmost to find more," Simamora said. "We still hope that those in lifeboats are still alive."

People in life rafts or holding on to some form of buoyancy aid can survive for days in Indonesia's warm tropical waters.

Simamora said that 12 bodies have been recovered. Officials have reported seeing some corpses in the ocean, while at least two survivors said that many of the victims were trapped in the ship when it sank.

The 12 men rescued on Wednesday had drifted around 200 kilometers (miles) from where the ferry sank before coming across the rig, said Syaiful.

Relatives of the missing have flocked to hospitals and ports along Java's coast, hoping their loved ones may turn up alive.

The Senopati Nusantara was built in Japan in 1992 and had a capacity of 850 people.

Officials say bad weather was the cause of the accident, one of several deadly maritime incidents in Indonesia in recent weeks.