The news came just days after Australian Prime Minister Tony Abbott abruptly cancelled a visit to Indonesia that had been viewed as a bid to thaw ties damaged by Canberra's border protection policies and a row over spying.
Reports at the time said he axed the trip to the resort island of Bali, where he had been due to meet Indonesian President Susilo Bambang Yudhoyono, over fears an ongoing turn-back operation could inflame tensions.
All the passengers were male, with 15 from India, two from Nepal and two from Albania, said a statement from the navy released late yesterday.
The navy said that based on testimony from the crew, the boat started sailing from central Sulawesi island on April 26 and managed to enter Australian territorial waters on Thursday.
More From This Section
"At midnight (on Thursday), the boat was checked by two Australian warships... The boat was later escorted towards Indonesian waters," the navy said.
It would have been his first since damaging revelations in November that Australian spies attempted in 2009 to tap the phone of Yudhoyono, his wife and inner circle.
Jakarta reacted furiously to the news, recalling its ambassador and halting cooperation in key areas including defence and people-smuggling. Tensions were further inflamed by Canberra's military-led crackdown on asylum-seekers making their way to Australia by boat from Indonesia.
The crackdown, named "Operation Sovereign Borders", involves Australian vessels turning back asylum-seeker boats to Indonesia when it is safe to do so.
In February two boatloads of asylum-seekers washed up in southern Indonesia in orange lifeboats, saying they had been transferred to the vessels by Australian authorities before being turned around.