Across Indonesia, conflicts among religious or ethnic groups have pushed hundreds of thousands of people from their homes. At the same time, Indonesia's porous borders make it an attractive transit point for migrants trying to sneak into other countries illegally.
There are between 600,000 and a million refugees at any given time in Indonesia. Most are "internally displaced persons" or IDP's, who have fled their homes because of sectarian or ethnic fighting.
Dozens of myriad minor conflicts have sprung up in the five years since the fall of Indonesia's former dictator, Suharto.
New political freedoms led to friction among some of Indonesia's different ethnic groups, problems that were suppressed during Mr. Suharto's 32 years of heavy-handed rule.
In eastern Indonesia, Muslims and Christians have fought sporadically for the past several years - resulting in the deaths of up to 10,000 people. While the violence abated last year, aid groups estimate 300,000 people remain displaced in the provinces of Maluku and North Maluku.
Michael Elmquist is the Indonesia director of the United Nations Office for the Coordination of Humanitarian Affairs. He says the roots of the Maluku crisis lie in a misguided policy, not in religious differences.
He says the Suharto government cut the prices paid to the mostly Christian farmers for spices grown in Maluku. But spice traders, mostly Muslims, saw no price cut. "So the conflict was more an expression of a shift in the economic balance between groups of people more than it was a religious conflict. It only later on got a kind of religious stamp on it," he says.
Christian-Muslim fighting on the island of Sulawesi has displaced nearly 250,000 people. Two years ago, a conflict in Central Kalimantan erupted between the traditional Dayak community and settlers who had migrated there. More than 100,000 people were forced from their homes, most of them settlers. Mr. Elmquist says for most IDP's in Indonesia, living conditions are basic, but not dire. "In most cases, the camps have been established by the local authorities in existing buildings, such as community centers, a former cinema, in some cases a sports stadium that was that was being used as a very large IDP camp," he says.
Refugee aid groups fear there may soon be a large humanitarian crisis in Aceh. Last month, the Indonesian government declared martial law in the province after peace talks with separatist rebels collapsed. Fighting has raged unabated since then - displacing more than 20-thousand people.
The government has barred foreign aid organizations from Aceh. But Foreign Ministry spokesman, Marty Natalegawa, says the refugee problem was anticipated before the military offensive was began, and assistance is being provided. "When we say humanitarian dimension, it's not only the most basic ones in terms of shelter and food, but also education and medical services. We are trying our best, our level best, to make sure that these sorts of things are properly provided for," he says.
But it is not just Indonesia's internal problems that fuel the flow of refugees. Thousands of people flock to Indonesia every year, trying to escape hardship in their own countries.
Indonesia is spread over 15,000 islands, and its borders are all but impossible to patrol. That makes it an attractive transit point for illegal migrants, most of whom want to sneak into Australia.
Many migrants who make it to Indonesia decide to apply for refugee status with the U.N. High Commissioner for Refugees. If granted, a migrant is entitled to resettlement in a third country.
But the application process can take months, fueling anger and resentment by the migrants towards the UNHCR. This year, U.N. officials canceled celebrations to mark World Refugee Day because of threats to its staff by Iraqi migrants.
The International Organization of Migration, or IOM, cares for nearly 500 such international migrants in Indonesia.
Earlier this year, roughly 70 percent of them were Afghans or Iraqis. But the figures are always changing, and reflect shifts in international politics. With the fall of the Taleban government in Afghanistan, scores of Afghan migrants accepted IOM help to return home. Now that the government of Saddam Hussein has collapsed in Iraq, the IOM hopes many Iraqis will ask to go home.
Stephen Cook, the head of the IOM in Jakarta, says "as the returns gradually start to take place, word gets back that everything's OK. And then that encourages more people to return. And we hope that a similar dynamic would get traction with the Iraqi caseload here."
Indonesian government officials say there is always room for improvement when it comes to dealing with humanitarian crises. For the moment some of the internal conflicts have abated, and there are programs to help refugees return home. But for now, Jakarta says it still needs international aid to care for those left homeless.