ABYEI, Sudan — There is a place in Sudan where Africa and the Arab world meet, where one thatched roof hut carries a roughly hewn cross at the top and next door an identical hut flaunts a crescent moon, where heavily armed nomads sweep in for raids and heavily armed villagers fight back.

This is Abyei.

It is the most contested, the most emotionally charged and, recently, the most violent piece of land in this country of nearly one million square miles. With southern Sudan’s historic independence referendum coming to a close on Saturday, and this nation rapidly preparing to split in half, the focus is shifting here.

Abyei has oil. It has fertile land. It straddles the disputed border between north and south Sudan, and it is crawling with militias, which have clashed in recent days, killing dozens. Two rival ethnic groups claim the right to belong here — the Misseriya, who are Arab nomads, and the Ngok Dinka, sub-Saharan cattle herders — and the bitterness between them is long and deep.

“Hyena and Misseriya,” said Kuol Alor Kuol, a 72-year-old Dinka man with foggy glasses, about why he was sauntering down Abyei’s main road with a fully loaded Kalashnikov. “They’re trying to take what I have.”

So many people here are armed to the teeth. Out on the front line, in half-deserted villages of crushed mud huts and endless yellow grass, a young Dinka man lounged at a police post, an assault rifle in his hands. Around him were teenagers in shorts and flip-flops, clutching cheap automatic weapons.

“There are no civilians here,” said John Ajang, the acting secretary general of Abyei’s local government.

Busloads of southerners heading home through Misseriya areas are routinely sprayed with gunfire. Several passengers have been killed. Roads are closing and many Misseriya are fleeing, fearing retaliation. United Nations officials said they saw large crowds of Misseriya men, armed with assault rifles, rocket-propelled grenades and machetes, amassing north of the town of Abyei. United Nations officials also crossed paths with Abyei police officers driving a truck with bound prisoners and three dead bodies in it.

The independence referendum itself has gone exceedingly well, with high, jubilant turnoutand orderly voting, showing that southern Sudan, one of the poorest places on earth, where more than three-quarters of adults cannot read, could step up for such a historic moment. Votes will be counted over the next two weeks, and the referendum is likely to pass, with the southern third of Sudan forming its own independent nation in July.

But the 1,250-mile border between the north and the south has yet to be demarcated, and the two sides have to decide how to share the oil; while most of it lies in the south, the south is landlocked and the north has the pipeline to the Red Sea. The two sides fought one of Africa’s longest civil wars, which killed more than two million people. Much of the violence was meted out by proxy forces and ethnic-based militias.

This is why Abyei is so worrisome, because so many of the ingredients of the wider north-south war — the oil, the proxy forces, the historic rivalries — are distilled here. “The coming conflict will be set off from Abyei,” predicted Mohammed Hamad, a political science professor in Khartoum.

It is not easy drawing a line through this country. Both north and south Sudan claim Abyei as their own. In Sudan, the extremes may be clear, with Arabs concentrated along the Nile around Khartoum, the capital, and Christian and animist people in the deep south, near the borders of Kenya and Uganda. But the middle, as Abyei shows, is a tapestry.

Many men in Abyei wear Arab-style robes and even natty, impossibly white Muslim prayer caps — but they are not Muslim. Decades ago, the Dinka here aligned themselves to the Arab north in the hope that they would be protected from slave raiders and would go to better schools.

But the Misseriya see Abyei as a special place, too, a rich pastureland to graze their cattle during the dry season, which they have been doing since time immemorial. The biggest waterway here, known in the south as the Kiir River, is so vital to the Misseriya that they have laid claim to it, calling it Bahr al-Arab, or River of the Arabs.

Still, the Ngok Dinka are the vast majority in Abyei, and though they may have fared slightly better than other Dinka elsewhere, they were also oppressed by the north and now want to join the south. “We will go to war over this,” said Rou Minyiel Rou, a veterinarian in Abyei. “This is about land, and we can’t compromise on land.”

In 2005, when the United States and others pushed the north and the south to sign the comprehensive peace treaty that set the referendum in motion, the two sides dug in over Abyei. So the negotiators set up a special joint administrative area for Abyei, which encompasses several thousand square miles, most of it swamp and scrub brush, and about 150,000 people.

That administration never got off the ground because of mistrust. In May 2008, tensions spiked. Militias attacked police posts, clashes erupted in the town of Abyei, and northern and southern regular forces piled in. The market was flattened and more than 200 people were killed — Dinka and Misseriya. A mass grave marked by a few sticks and lumps of gravel lies on the outskirts of town.

Many people say the recent fighting is heading down the same destructive path. In the past 10 days, Misseriya militias have ambushed Dinka civilians; while the local police are backing up the Dinka, southern officials say the northern army is arming and training the Misseriya, which the Misseriya deny.

“Why would we attack now?” asked Sadig Babo Nimir, a Misseriya leader. “We are ready to host the Dinka as we did before.”

He accused the southern government of dressing up soldiers as police officers and sending them into Abyei in contravention of the 2005 peace treaty, an accusation that Western officials in Sudan say is probably true. It seems that both sides are jockeying for position, trying to seize control of various patches of Abyei, before a final border settlement is struck.

Complicating matters, said Mr. Hamad, the political science professor, was that while the heavily armed Misseriya were aligned with the north, “Sudan has always been a place where the center has no control over the periphery,” especially when the agendas diverge, so it may be difficult now for the northern government to reel in the Misseriya.

A separate referendum to determine whether Abyei belongs to the north or south was put off indefinitely last month because the north and south could not agree on who could vote in it.

The southern government is also getting increasingly fed up with the United Nationspeacekeepers mandated to patrol Abyei. “The U.N. are supposed to keep peace,” said Col. Philip Aguer, a southern military spokesman. “But they are not keeping any peace. They are just enjoying themselves, eating fat salaries.”

United Nations officials say they have recently increased air and land patrols. United Nations officials here also took the surprising step of flying in Ahmed Haroun, a Sudanese official who has been indicted by the International Criminal Court on war crimes charges surrounding the atrocities in Darfur, for a meeting with Abyei elders. Mr. Haroun, who used to be a minister in the northern government, is now the governor of the state of Southern Kordofan, north of Abyei, which is also haunted by various militias and quite combustible itself.

The meeting culminated in an agreement to better regulate the Misseriya migration and pay compensation for victims of the clashes.

But few think that will help.

“Share Abyei with the Misseriya?” said Ngor Agok Deng, a Dinka elder, laughing. “I won’t even share a meal with the Misseriya.”

Josh Kron contributed reporting