Australia and Indonesia have agreed to step up co-ordinated efforts to tackle people smuggling in the region, helping to reshape relations between the two nations.
Canberra has long complained about the number of asylum seekers from the world's trouble spots arriving on its shores via Indonesia.
The announcement by Susilo Bambang Yudhoyono, Indonesia's president, and Kevin Rudd, Australia's prime minister, on Wednesday came as a boatload of asylum seekers was stopped off the country's northwestern coast.
"The handling of the boat people issue is very complex," Yudhoyono said. He said his country planned new laws which would jail people smugglers for up to five years.
He said the issue touches on "matters relating to the law, to security and to humanitarian issues ... and that is why we need to co-ordinate and co-operate very closely".
Rudd has come under increasing pressure to stop a surge in asylum seekers arriving by boat over the past year.
Sri Lankans, Afghans and Iraqis seeking a better life in Australia frequently use Indonesia as a launching point for their journey.
Yudhoyono also said the two sides had progressed from a "love-hate" relationship to a bold strategic partnership, as they seek to improve exchanges and work on a possible free trade deal.
But he cautioned that they needed to overcome "age-old stereotypes" which painted Indonesia as a military dictatorship and Australians as pro-white.
Rudd said links between the countries had been upgraded to a "new level" during the visit, dramatically reshaping relations which were previously characterised by a series of flare-ups.
Al Jazeera's Step Vaessen reports on a group of boat people stranded in an Indonesian port
Relations between the two nations have been previously strained by disagreements over asylum-seekers, death sentences for three Australian drug-smugglers and Australia's war-crimes probe into Indonesian troops' 1975 killing of five journalists in East Timor.
Yudhoyono, on his first official visit to Australia, was given the honour - usually reserved for the most important visiting heads of state - of addressing a joint sitting of Australia's parliament.
His visit comes a little more than a week before a scheduled visit by Barack Obama, the US president, to both Indonesia and Australia for talks on security and other issues.
The boat carrying asylum seekers that was stopped off northwestern Australia on Wednesday, underscored the difficulty the two countries face in stopping illegal immigration rackets.
Australian border patrol intercepted the boat carrying 46 asylum seekers and three crew on a remote Australian atoll 120km south of Indonesia's Rote island.
Their nationalities were not immediately known.
Critics want Indonesia to do more to stop asylum seekers passing through its territory, and both the leaders spent part of Wednesday hammering out a plan to combat the problem.
Neither of them gave details, but Yudhoyono told legislators the two countries would intensify their co-operation and speed up the process of relocating asylum seekers.
New law proposed
Yudhoyono said there are plans to introduce a law criminalising people smuggling with up to five years in jail upon conviction, but conceded that the problem was unlikely to be solved immediately.
The announcement on Wednesday of the co-operation plan coincided with Indonesia's confirmation that Dulmatin, a crucial suspect in the 2002 Bali bombings, had been killed in a shootout with police the previous day.
The suicide attacks on two nightclubs on the resort island killed 202 people including 88 Australians.
Australian police helped their Indonesian counterparts investigate the bombings.
Two years later, the Australian embassy in Jakarta was targeted by another terrorist bombing.
Since then the two countries have increased intelligence sharing to combat militancy.