Malaysian Prime Minister Mahathir Mohammed and Indonesian President Megawati Sukarnoputri made little headway in resolving the sensitive issue of Indonesians working illegally in Malaysia. The two leaders are wrapping up two days of meetings on the Indonesian island, Bali.

Malaysia has set July 31 as the deadline for all illegal workers to leave the country. Those who remain face six months in jail and up to six strokes with a cane. The penalties also apply to Malaysians who harbor illegal workers.

About 100,000 Indonesian workers are now stranded in border areas, trying to leave Malaysia.

Hundreds of thousands of Indonesians cross into Malaysia every year in search of work.

"As an illegal migrant, you might face the prospects of all sorts of exploitation in employment, because you don't have any rights, you don't have any ability to complain about your conditions," said Alan Boulton, Indonesia director of the International Labor Organization. "That illegal status can be taken advantage of by unscrupulous people."

It is unlikely the two nations will ever completely stop the flow of people in search of work. Mr. Boulton says there are other ways to address the problem.

"One of the ways you might address this problem is by providing more established and better legal means for people to move from countries where there is a surplus of labor to countries where there is a need for extra labor," he said.

During this week's meeting, Malaysian Prime Minister Mahathir and Indonesian President Megawati signed an agreement on using new technology to help control the flow of migrant workers.

Other issues also figured on the agenda. They signed a memorandum of understanding on Indonesia providing natural gas to Malaysia starting in 2005.

Thai Prime Minister Thaksin Shinawatra joined the meeting Thursday afternoon. The three leaders signed a deal creating a rubber consortium between the three countries to boost prices on the international market.