Hundreds of U.S. and Canadian nationals were flying out of riot-torn Jakarta in the early hours of Saturday in the first mass organized evacuation of foreigners from the Indonesian capital.

About 800 evacuees were headed for Singapore and Bangkok aboard two chartered Cathay Pacific Boeing 747s. The evacuation was ordered after Jakarta was rocked by several days of rioting, looting and burning.They included dependents of U.S. and Canadian embassy and government officials working in Jakarta, non-essential staff and families from the business community. Essential embassy staff were remaining.

U.S. ambassador J. Stapleton Roy said the evacuation had been ordered because the situation in Jakarta had "rapidly deteriorated over a two-day period."

"On Thursday, as the rioting and looting got worse, we encountered a situation where the police were no longer able to provide any protection, where Americans were reporting that they were encountering dangerous situations, including in their residences," he said.

The Indonesian government "was no longer in a position to guarantee the security of Americans, where we couldn't predict what was going to happen," he added. He said: "we felt that the only safe course was to ask Americans to leave until the situation had stabilized."

The evacuees were flown out of the civilian part of Jakarta's Halim air base. They had gathered at three points in the city and been driven in buses under police escort to the air base where they were processed through a hall normally used for Indonesian Muslims making the pilgrimage to Mecca.

Embassy officials said there would be more flights over the weekend to evacuate those who were unable to get seats on the first two flights and others who wanted to leave.

Canadian Ambassador Gary Smith said priority had gone to children, the elderly and the infirm.

"The situation is unpredictable at this time, and given the events of Tuesday, Wednesday and Thursday, we thought it was safer to recommend (the evacuation) at this time," he said.

The evacuees had been given about 12 hours notice and were allowed one bag each.

"The (U.S.) government said we should go, but we'll be back," Ernie Olson, a telephone company employee from Boston, said outside one assembly point at the ambassador's residence.

Ken Tiemann, a 46-year-old scuba diving instructor from St Louis, said he was going "because all my customers are leaving."

"I'm going to come back as soon as it all calms down," he added before taking the Bangkok flight.

Pets were banned, and 30-year-old Holly Ferrette from New Jersey said leaving her terrier Indah, rescued from a dog pound two years ago, had been hard to do.

"The dog's staying with our guard. We left money with Indonesian friends and they'll start processing papers to get her out of the country if necessary," she added.

She said she worked for the U.S. Agency for International Development (USAID) and she and her husband, Fernando Gonzalez, 35, from Costa Rica, had had no option when told to leave.

"We'd rather stay and see how things go. It's hard leaving behind our Indonesian friends," she added.

While the evacuees were being processed, a line of light tanks, armored troop carriers and trucks laden with troops clattered and rumbled past on the opposite side of a small park from the residence.