DAKAR, Senegal — Thousands of refugees fleeing attacks by Arab militias and Sudanese army bombs in the ravaged western region of Darfur have flooded into neighboring Chad, the United Nations said Sunday, and many more may be on their way as Sudan strikes back at a rebel offensive in the area.

The attacks throw a region sundered by conflict into still deeper chaos as a volatile mix of rebels, government forces and ethnic militias jockey to control a vast and unforgiving stretch of semidesert that straddles the two troubled countries. Just a week ago, Chadian rebels based in Sudan tried to topple Chad's government, making it all the way to the gates of the presidential palace in Ndjamena before being beaten back.

Making matters worse, the rebel group that had controlled the part of Darfur under attack, the Justice and Equality Movement, warned the new U.N.-African Union peacekeeping force not to enter the area. The rebels said the area was an active war zone and that any armed group, including peacekeepers, would be considered hostile and fair game.

"There is no cease-fire, the war is going on," said Suleiman Sandal Haggar, a senior commander with the rebel group, in an interview via satellite phone. "In this situation it is very difficult to talk about peacekeeping when there is no peace to keep."

About 6,000 Sudanese reached the border town of Birak in Chad, said Helen Caux, a spokeswoman for the U.N. refugee agency, and a roughly equal number had gathered in a nearby village. The first wave consisted mainly of men. An unknown number of women and children, for whom the voyage on foot is much slower and more deadly, followed behind, the refugees told the United Nations.

"They are destitute and terrified," Caux said.

The new arrivals will join the 240,000 Sudanese refugees already living in Chad, and a nearly equal number of Chadians who have been displaced by chaos along the border. The influx pushes the number of people in eastern Chad dependent on an already overstretched aid operation toward half a million.

The refugees told U.N. officials of a terrifying assault by Arab militiamen, who arrived on horseback and in trucks, descending on the towns of Sirba, Suleia and Abu Surouj, north of the provincial capital, Geneina, near the border with Chad.

The attacks apparently were an attempt by the Sudanese government to check the advance of the Justice and Equality Movement, which has been gathering strength recently. Once the smallest of the Darfur rebel groups, it has been growing in size and influence, thanks in large part to its high-level clan links to Chad's president, Idriss Deby, who is its patron and ally.

The new fighting will further complicate the long-awaited deployment of a U.N. and African Union joint peacekeeping force in Darfur. It officially began its work on Dec. 31 but has been plagued by logistical problems and stonewalling by the Sudanese government.

Speaking to the U.N. Security Council last week after a visit to the region, Jean-Marie Guehenno, the top U.N. peacekeeping official, warned that "what we are witnessing is actually a war with offensive, counter-offensive fighting."

Jan Eliasson, the U.N. mediator in the region, told the Security Council that "over the last few months, the security and humanitarian situation in Darfur and the region has dramatically deteriorated."

The morass of conflict engulfing the region has become more complex and difficult to control since it first grabbed the world's attention in 2003, when the Arab-dominated government of Sudan unleashed Arab tribal militias known as the janjaweed on non-Arab rebel groups in Darfur. The rebels were seeking greater autonomy and a larger share of Sudan's wealth.

The government-allied militias carried out a brutal counterinsurgency that President Bush and others said was genocide. In all at least 200,000 people have been killed in Darfur, according to published mortality surveys, and 2.5 million have been driven from their homes.

The Sudanese government has denied that accusation and has said that the death toll has been exaggerated.

Since then, the violence has ricocheted into Chad, where ethnic and political tensions mirror those of Darfur. Some of the rebel groups have close ties to Deby and are allowed to operate freely in Chad. Sudan has retaliated by helping Chadian rebels trying to topple Deby, according to analysts and diplomats.

Meanwhile, within Sudan, the Darfur rebel groups have splintered and fought among themselves. Some of the Arab militias loyal to the government have also switched sides in the fight more than once.

The result has been a free-for-all that looks less like the 1994 genocide in Rwanda, to which the Darfur conflict has often been compared, and more like a grim combination of the cross-border war that engulfed Congo and its neighbors in the wake of Rwanda's agony and the warlord-ruled chaos of Somalia.

Chadian rebels, meanwhile, claimed Sunday that they were on the offensive once again, after being routed by government troops and forced to retreat from the capital, Ndjamena.

In a statement posted on a rebel-linked Web site, Ali Ordjo Hemchi, a spokesman for the alliance of three rebel groups seeking to overthrow Deby, said that the group had taken control of the crossroads town of Am Timan, and seized a cache of weapons and dozens of vehicles.