(CNN) -- The 162 passengers who were transferred from a ship in distress in waters south of Indonesia were en route Wednesday to Christmas Island, the Australian government said.
Two ships from the Royal Australian Navy were en route Wednesday to the island after accepting the transfer of the passengers, the Australian Maritime Safety Authority said in a statement.
HMA Ship Leeuwin was carrying 99 passengers, three of whom were receiving medical treatment, and HMA Ship Wollongong was carrying the 63 passengers, the authority said.
"Upon arrival at Christmas Island, the passengers will undergo initial security, health and identity checks and their reasons for travel will be established," the release says. "The safety of all involved in this situation remains the immediate priority."
Christmas Island is a remote territory northwest of the Australian mainland, near Indonesia.
The transfer to the Australian Navy ships occurred hours after the Australian Maritime Safety Authority said 130 to 180 people were believed to be aboard the boat south of Java and northwest of Christmas Island.
Several ships carrying people seeking asylum in Australia have run into trouble in that area in the past two years. Australian authorities declined to say Wednesday whether the people on the boat in distress were seeking asylum.
The issue of migrants taking risks to reach Australian shores has created significant political tension in the country.
The Indonesian National Search and Rescue Agency said it had observed the struggling boat from the air.
"We saw the ship crew and passengers were still wearing their life jackets on board the ship, which was floating on the sea," said Gagah Prakoso, a spokesman for the agency.
More than 200 people were pulled from the sea near Christmas Island after two accidents last month. No death total was announced from those accidents because authorities did not know how many people had been aboard the vessels, but dozens are believed to have died.
Prime Minister Julia Gillard and Indonesian President Susilo Bambang Yudhoyono this week discussed ways to combat the asylum problem.
Gillard pledged Australia will help Indonesia increase its ability to communicate with merchant ships "during safety of life at sea incidents."
The Australian Senate recently rejected a bill that would have revived plans to process asylum-seekers in offshore detention centers.
The bill's defeat leaves the country without an effective response to attempts by asylum-seekers to enter the country.
The question of what to do with the thousands of asylum-seekers who attempt to reach Australian shores each year has long divided the country's political parties and its people.
CNN's Kathy Quiano, Joseph Netto, Hilary Whiteman and Joyce Joseph contributed to this report.