East Timor appeared to be spiraling into anarchy as anti-independence militiamen rampaged through towns and the countryside, burning houses and shooting in response to this morning's announcement that nearly four-fifths of East Timorese had voted to break away from Indonesia.

Thousands began to flee the territory as the militias roamed unchecked, storming the Portuguese consulate and shooting an American citizen who was working as an unarmed U.N. policeman. Dili's airport and dock were jammed with people trying to leave, and about 5,000 people swarmed into the main police station here looking for an armed escort to East Timor's land border with Indonesia.

"I was hiding in my house. I could hear shooting," said a woman named Siti, who went to Dili's dock with her husband and three children, hoping to find space on an outgoing ship. She came from the Becora neighborhood, which is now largely deserted after being besieged by the militias for two days. "All of my friends have left," she said.

The United States, European Union and other foreign authorities appealed to Indonesia's central government to act to halt the violence, but it was not clear whether Jakarta would do so.

With the police seemingly helpless, the Indonesian army appeared more interested in leaving East Timor than trying to secure its streets. Several military flights came in today to evacuate non-Timorese Indonesians and dependents of security personnel.

The militias appeared to be gaining control of the western part of the territory, which borders Indonesia, in hope of carving out an area that would reject independence. While information was sketchy, there was a report that 20 were dead in one western town.

[Early Sunday, Indonesia's defense minister, Gen. Wiranto, and the foreign minister, Ali Alatas, arrived in Dili with a high-level team of military officials. They conferred with regional military commanders. No details were available.]

The escalating militia violence seemed likely to heighten calls for sending armed foreign peacekeepers to East Timor. Australia, with several thousand troops based in Darwin who could be here in days, would be the most likely to lead such a force. But so far there has been no formal word on planning. A U.S. diplomat indicated Washington was content to let Australia take the lead role, saying, "It's their Haiti."

The violence comes in reaction to the announcement earlier today that East Timorese voted 78.5 percent to 21 percent to reject an Indonesian proposal of autonomy in a historic ballot on Monday. The Indonesian government said that if the proposal were rejected, East Timor could become independent. It was the first time the Timorese had a formal opportunity to express their views since Indonesia invaded East Timor in 1975 -- following colonial ruler Portugal's withdrawal -- and annexed it the next year.

For the last 24 years, guerrilla forces have waged a low-level campaign for independence. Earlier this year, the Indonesian army created and armed 13 militias to oppose independence, and they have pursued a bloody campaign of fear and intimidation that has continued in the days since the vote.

Angry militia members attacked the downtown Mahkota Hotel, where many U.N. staff members and foreign journalists are housed. Shots were fired at the hotel's front doors, a man with a machete smashed in the front glass window, and gunfire whizzed over the roof.

As the militias fired at the hotel from across the street, Indonesian police with automatic weapons stood by and did nothing to intervene. Policemen could be seen putting their arms around militiamen and trying gently to move them away from the front door. By nightfall, all the police had disappeared.

With journalists huddled in their rooms, the Australian government was readying an emergency evacuation plan to take out its nationals, along with Americans, Canadians and Britons, should the situation further deteriorate.

Those Timorese who could not afford to leave looked for refuge. More than 1,000 people streamed into the residential compound of Bishop Carlos Belo, who was awarded the Nobel Peace Prize for his work on behalf of East Timor.

The large size of the vote for independence raises the likelihood of a precipitous Indonesian military withdrawal, even before the next stage of the process, which is a vote by the parliament in Jakarta to allow East Timor to separate. That vote may not come for two more months, and if the army and police decide to concentrate on their own withdrawal, East Timor could be facing a dangerous power vacuum.

If bloodshed continues, pressure will grow on the pro-independence guerrillas, called Falintil, to end their self-imposed cease-fire, leave their base camps and engage the militias.

The militia groups have apparently been trying to lure the guerrillas into the fight, blocking supplies from reaching two Falintil bases.

The guerrilla group's jailed leader, Xanana Gusmao, warned that a further spiral into violence is likely. In a statement in Jakarta, Gusmao, who has become a voice for reconciliation, said, "We foresee chaos. We foresee a new genocide in East Timor."

"Today could have been a happy day," said Gusmao, who heads the National Council of Timorese Resistance. "But today violence is the rule imposed on the defenseless population, forced to witness their homes burnt to the ground, the looting of their possessions, left to mourn their dead and care for the wounded."

But the council has made it clear that it is leaving it to foreign governments to send a force to deal with the militias. "We are in the hands of the international community, and believe they will guarantee our security," said Leandro Isaac, the council spokesman in Dili.

Asked if he feared for his life, Isaac said: "Today I'm not afraid. Today, I'm ready to die."

Outside Dili in the western districts, the militias have seized control of the major towns, and the United Nations has essentially abandoned the region. U.N. staff members have been evacuated from the towns of Same and Saui. Gleno and Maliana were evacuated after Monday's referendum when militias began rampaging and at least two U.N. staff members were killed. And today, U.N. officials were evacuated from Liquica by helicopter.

Ninety-six U.N. staffers were evacuated to Dili, and tonight all U.N. employees were huddled in their compound here.

The American civilian police officer was shot in Liquica, and was said to be in stable condition. In Washington, the State Department said he had been shot in the stomach and was evacuated by medical plane to Darwin, Australia.

The State Department statement also said the Jakarta government was dispatching a high-level ministerial mission that is to arrive here Sunday. "We hope the intervention will lead to restoration of order and human rights," the statement said.

There were few reports on the extent of deaths, injuries and destruction in those towns now that all foreigners have left, and no journalists were traveling there. In Liquica, the last report was that houses were burning, and in Maliana as many as 20 are believed dead. In all those towns, East Timorese who worked for the United Nations have been targeted by militia death squads.

The militia consolidation of western areas appears to take the pro-Indonesian faction closer to its strategy of creating an enclave that will reject the outcome of the referendum and declare its affiliation with the Jakarta government. One key militia leader, Eurico Guterres, seemed to hold out that possibility again today, when he said that while he accepted the result, "I demand to retain my rights as an Indonesian."

"I can't betray my homeland," said Guterres. He spoke at the airport, just before he boarded a flight to Jakarta, where he was to meet with Indonesian military leaders.

Guterres said he was leaving now because he had been "called," adding, "We have been defeated diplomatically, but we are not giving up."

Staff writer Dan Morgan in Washington contributed to this report.