Japan has agreed to release two activists who were detained after boarding a whaling ship in Antarctic waters, Australia's foreign minister said Wednesday.

Japanese whalers accused the activists of attacking their vessel with bottles of acid and illegally boarding on Tuesday, and said the pair had been detained.

Japanese officials denied claims the men had been assaulted and tied up on deck.

• Click here to visit FOXNews.com's Natural Science Center.

The activists came from the group Sea Shepherd, which openly vows to take extreme action to try to stop Japanese whalers.

The incident occurred shortly after the Sea Shepherd ship Steve Irwin located the Japanese whaling fleet in the Antarctic Ocean.

Foreign Minister Stephen Smith said Australian officials had contacted the Japanese government immediately after learning the two men — Australian Benjamin Potts, 28, and Briton Giles Lane, 35 — had been detained, and sought their release.

"Late last night I was advised that the Japanese govt had agreed to this and had instructed the Japanese whaling ship to return the men to the Steve Irwin," Smith told Australian Broadcasting Corp. radio on Wednesday morning.

He said the men had not been returned by early Wednesday.

"The priority here is the immediate safe and secure return of these two men to the Steve Irwin ... the Japanese government has agreed to that, but I now want to make sure that is effected urgently," Smith said.

Australian Federal Police had indicated it was evaluating whether there had been any unlawful activity connected to the incident, he said.

The ship Steve Irwin is named for the late Australian wildlife ranger and TV personality who broadcast phenomenally popular television shows about animals. He was killed by a sting ray's barb that pierced his heart during a videotaped dive.