gunfire crackled throughout Port-au-Prince yesterday and the capital fell into chaos as Jean-Bertrand Aristide, Haiti's beleaguered president, resigned and flew into exile.

Within hours, Boniface Alexandre, the chief justice, was named as his successor, as laid out in the constitution.

Yvon Neptune, the prime minister, read a statement by Aristide, evidently written late on Saturday night, in which the president said: ''Today is a very difficult day. I am determined to respect the constitution.

''If tonight my resignation is the decision that can avoid a bloodbath, I consent to leave with hope there will be life, not death.''

Though not aligned with rebels, the political opposition had pushed for Aristide to leave for the good of Haiti's eight million people, angered by poverty, corruption and crime.

The four-week uprising, only the most recent in the violent history of this Caribbean nation, has killed at least 100 people.

Guy Philippe, a rebel leader and former police chief, said the fighting was over.

''If we move in Port-au-Prince, it will be to put [impose] security but we don't intend to fight any more. Time is up for fighting any more.''

Philippe, who is based in Cap Haitien, the second-largest city, welcomed a decision by the US president to send in American marines.

George W Bush said the United States will lead an international peacekeeping force to help restore order in Haiti.

The UN security council met last night for consultations about setting up the force.

''This is the beginning of a new chapter in the country's history,'' Bush said.

''I would urge the people of Haiti to reject violence to give this break from the past a chance to work. The United States is prepared to help.''

A contingent of up to 500 marines from North Carolina was expected to land in Haiti last night.

Other nations have told the United States that they are prepared to join the mission. Up to 200 French troops are due in Haiti today from the French Caribbean colonies of Martinique and Guadeloupe.

The US Coast Guard, meanwhile, is picking up Haitian boat people trying to flee the violence and returning them to the island.

Aristide's destination was unclear but Haiti's consul in the neighbouring Dominican Republic said he had travelled to Antigua, in the eastern Caribbean, to refuel and then planned to travel to Morocco.

Morocco, however, said it would not grant Aristide asylum.

Costa Rica and Panama both made public offers of temporary asylum but Aristide had decided to go to Africa instead, said Rogelio Ramos, the Costa Rican security secretary.

A US official said South Africa was the country most often mentioned.

Colin Powell, the US secretary of state, conferred yesterday with Thabo Mbeki, the South African president, about the crisis.

However, officials in Johannesburg said there had been no recent contact with Aristide, nor an offer of asylum.

With the rebels closing in on Port-au-Prince, many had feared a bloody battle for control between them and Aristide's militant supporters.

A US official in Washington said Aristide's departure had averted a bloodbath but he warned the country was heading into a period of instability.

''We managed to stave that off, but we are heading into another dangerous period because any vacuum in Haiti could also be dangerous,'' he said.

The US, which invaded the country in 1994 to restore Aristide to power, has been criticised for acting too slowly in the current crisis.

It failed last week to negotiate a political compromise meant to avert a collapse of the Haitian government.

By the end of the week, however, Washington had made clear it had lost faith in Aristide and his departure became just a matter of time.