HARGEYSA, SOMALIA -- Welcome to the fragile heart of the self-proclaimed republic of Somaliland, a nation that would be, a wounded people living on the edge.

Four years after this city was flattened by the war machine of then-Somali dictator Mohammed Siad Barre and 18 months after Somaliland declared independence from the rest of Somalia, most of Hargeysa's battle-scarred inhabitants seem determined to get back to business the best they can. They are trying even if the international community does not recognize Somaliland as independent.

Although few shops were left standing, women in colorful print wraps sell tea, soap and tinned goods from the refurbished interiors of old shipping containers and converted troop carriers. Children chant their lessons in schools whose walls are blasted out and ceilings are open to the sky.

Money-changers in the bustling market stack piles of dollars, Somali shillings, Ethiopian birr and Djibouti francs. Electric power lines are being restrung, tin roofs restored. And each afternoon, well before the sun sets in the vast clarity of the Somali sky, men queue up to buy khat, a mildly narcotic leaf that is a staple of masculine life.

Beneath the innocuous and hopeful rhythms of daily rituals, however, drums the insistent counterpoint of anarchy and fear.

Even at midday, it's not uncommon to hear the crackle of automatic weapons fire around the city, while at night the boom of 50-millimeter guns is frequent. Vehicle theft and armed shakedowns have become routine for foreigners and more affluent Somalis, usually at the hands of young men who drive "technicals" -- pickup trucks and four-wheel-drive vehicles fitted with rocket launchers or machine guns.

This legacy of lawlessness, bred during the long years of destruction and the steady shredding of Somalia's social fabric, has been fed in peacetime by the near-total lack of government authority, the scarcity of economic opportunities -- and too many guns.

Rivalry among the dominant Isaak clans, submerged during the uprising against Siad Barre, has resurfaced during the ineffectual tenure of President Abdurahman Ahmed Ali. Ill-advised and unsuccessful military drives by the president's Habre Younis faction on the port of Berbera and the town of Burao earlier this year left Somaliland divided. Today, active and well-armed militias, including those of Moslem fundamentalists, challenge what little authority is left.

Out of 17 original government ministers, "only five or six remain," according to the president's own count. No organized legislature or security force exists. Government banks, all looted, are closed. Basic services such as health, schooling and garbage collection depend far more on community initiative and a few foreign relief agencies than they do on government.

Thanks to the resilient "social welfare" system of the extended family, an assertive network of elders and the reviving livestock industry, Somaliland has thus far avoided the complete breakdown and catastrophic starvation that characterize the southern stretches of Somalia.

Most Somalilanders seem determined to remain independent from the south, pointing to their distinct history as British Somaliland and four days of independence before it united with the former Italian colony in the south. The long years of repression by Siad Barre also helped forge a separate identity.

But the south has cast a troubling shadow: There is widespread recognition among Somalilanders that in spite of its hopeful start in May 1991, the new republic has plunged off-course. And, while the world has sent money and food to the rest of Somalia, Somaliland has languished in neglect.

"We have lost our way and must start all over again," lamented Sheik Ibrahim Yusuf Madar, the head of Somaliland's council of elders, at a recent meeting to consolidate a peace accord between the two opposing Isaak factions and to draft a blueprint for future governance. "The politicians failed us and left us in chaos."

The most pressing concern of the older generation is how to defuse the country's armed and angry young men. Officials from the Somali National Movement (SNM) that swept into Somaliland in February 1991, helping to oust Siad Barre, say the SNM's ranks of approximately 20,000 fighters have been joined by as many as 30,000 other armed youngsters. Many operate beyond SNM control, as freelance militias working for "protection money."

Although they rarely approach the level of violence of the gun-toting thugs who sow terror in the south, their unpredictable behavior intimidates foreigners and Somalilanders alike and keeps tensions high.

"If we don't quickly set up a system to create jobs and get things going, there will be total destruction," predicted SNM Col. Ibrahim Abdallahi Dagoweyne, whose own militia controls the area around the port of Berbera. "The international community can help us make a new beginning before it is too late."

The United Nations has long pondered a demilitarization scheme for Somaliland, but U.N. officials say it seems far from fruition: The absence of any central control over the country's many militias remains a major obstacle.

Somalilanders generally seem to realize that major external support will not arrive until, as Dagoweyne put it, "we organize ourselves a bit better." Many are pinning their hopes on the meeting of elders at Sheikh. Most factions would also like to see a new national reconciliation conference soon to set up a fresh government -- a move resisted by President Abdurahman.

In the meantime, the deep wounds of a decade-long guerrilla struggle and the devastation of Somaliland by Siad Barre's forces are left to fester.

The physical scars are everywhere in this ruined capital. The 1988 assault on Hargeysa, in which government troops stationed at a nearby base launched mortars and aerial bombs, killed as many as 50,000 people -- about one-sixth the population -- and destroyed some 85 percent of the buildings.

In what were seen here as symbols of Siad Barre's determination to crush northern opposition and cultural identity, government planes leveled the principal mosque, as well as the theater, library and museum.

But while there are many signs of physical reconstruction, the psychological damage lingers. Citizens with nervous disorders abound in the streets, like an articulate ex-teacher who is convinced that foreign spies have tapped into his brain.

"These are people who have lost so much they just can't cope," said Somalilander Mohamed Aideed Elmi, an emergency health officer with the World Health Organization. "They are plagued by the thought of why am I alive when everyone else has been killed?"

Other Somalilanders, many of them highly educated, are floundering in the painful transition from the high expectations of independence to the reality of a devastated country of limited opportunity.

Suleiman Adam Mahmoud Gall, a former interior minister fired for differences with the current government, said: "The human destruction that has taken place over the past decade is much more serious than the physical. Family values, respect, the human mettle, all have been destroyed."

Many are trying. SNM Veterans Association head Yusuf Abdi Gabobe is seeking jobs and offering informal counseling to ex-fighters.

"There is a lot of bitterness," Gabobe said. "What have we come home to after 10 or 11 years? It's hard to face the facts -- that our government collapsed, there was a power struggle, and deficiencies among the veterans themselves."

With jobs, vocational training and education, Gabobe said, it would be easy to lure them back to "normal life." But, he worries, "If they come to me and I have nothing to offer them, I fear the whole cycle will begin again."