GHADAMES, Libya -- The heat of an early summer sun bakes dust and reddish sand into a fine powder. The desert wind known as ''al ghibli" whips it along sizzling asphalt streets and piles it in perfect miniatures of the enormous Saharan dunes that begin a few miles away.
As the season progresses, high temperatures rise to 100, 110, even past 120 degrees. Not even mad dogs or Englishmen venture out between midday and evening.
But on the streets and in the public spaces of the old city of Ghadames, a whitewashed marvel of mud-brick and palm-wood architecture, the temperature never rises above 86. Passageways, shops, mosques -- all are insulated by multiple-layer walls and roofs pierced by shafts to the outside that admit light and fresh air, and set up a life-size chiaroscuro.
The houses of the old city are vacant now, their owners moved to modern residences in the new town. When the heat builds, however, the Ghadamsia return to the cool, dark labyrinth, where they gather as their ancestors did from the eighth century on.
Centuries-old communal rules are observed: Old men have sitting areas near the mosques, young men near public squares, boys near the religious schools. Local women are neither seen nor heard.
Ghadames (pronounced g'DAH-mis), settled many thousands of years ago where Libya, Tunisia, and Algeria now converge, is among the treasures of Libya that are becoming accessible to visitors from the United States as the long estrangement between the US and Libyan governments nears an end. Visas are hard to get, especially for independent travel, but no longer impossible.
Tourist accommodations are basic, and sometimes worse, but the rewards are substantial. There are fabulous Roman ruins at Leptis Magna and Sabratha on the western Mediterranean coast, Greek ruins on the eastern coast, prehistoric hieroglyphs deep in the Sahara.
Ghadames, about 420 miles southwest of Tripoli, is unique, incorporating 4,000-year-old nomadic traditions, Roman influences from the time of Christ, and, above all, Berber-Arabic construction and customs from the first decades of Islamic dominance of North Africa.
Earliest history here is based more on legend than historical record (there is evidence of settlements back to Paleolithic and Neolithic times), and the legends are contradictory. All the stories agree that the spring upon which Ghadames's oasis culture was founded was discovered by an animal belonging to desert tribes, and many say this is why the original water source was named Ain el Ferssa, ''the well of the mare." Others disagree passionately, insisting that the founding beast was a camel.
In any case, agriculture and trade developed around the oasis, and Ghadames became one of the first settled towns in a previously nomadic area.
Local chieftains ruled for many centuries, but in 19 BC, Ghadames was made a garrison town by the conquering Romans. Local rule was restored when Rome fell to the Vandals, and reconquest of the region by the Byzantines was only superficial.
For, ups and downs of history notwithstanding, it was trade -- through the Sahara to West Africa, and through the coastal plain to the Mediterranean and Europe -- that kept Ghadames going. With the coming of Islam, in the seventh century, the city matured into a mix of commerce, cultures, and climatic adaptations found nowhere else.
As tribes and clans settled branches here to represent their interests, the city developed seven distinct sections, each with its own central mosque, religious school, and social-activities area, with the borders of each group's domain marked in the whitewashed walls ornamented with good-luck symbols and topped with triangles to ward off the evil eye. Most of the time, there was no central authority.
Women, barred from the main streets and from communication with men outside their immediate families, developed a separate social network and street grid across the rooftops. The restrictions were still in force when the populace evacuated in 1982 to new government-sponsored housing, and the custom is maintained even now.
Unlike the mosques of Tripoli's old city, which admit non-Muslims if prayers are not in progress, the Ghadames mosques bar people of other faiths. Still, based on glimpses from the streets, the mosques here (the oldest of which was constructed in 662) are far less interesting to the non-Muslim than the beautifully tiled and decorated sanctuaries in the capital, which date to the much later period of Ottoman Turkish rule.
As in many ancient, underdeveloped sites, in Ghadames, the cultural tourist's treasure trove became a place of cherished history but contemporary misery for inhabitants, and the evacuation to ''new Ghadames," where the architecture is highly evocative of the old city's design, seems to have been voluntary.
From olden days until 1982, the population, kept down by epidemics and poor sanitary conditions, ranged between 6,000 and 8,000 people, according to Taher Ibrahim, a retired history teacher who is available to guide tourists in the old city. (You mail e-mail him at firstname.lastname@example.org.)
Though the old city was partially electrified in 1956, serious health problems continued, Ibrahim said, because ''there was no way to install a water and sewage system, because the moisture would have undermined the walls." A fresh-water canal still runs through parts of Ghadames, but this water is not fit for consumption, or perhaps, by modern standards, even for washing.
The old city was designated a World Heritage Site by UNESCO in 1986, and in the last five years preservation and conservation work has been performed under the auspices of the United Nations Development Program, he said.
Former residents retain title to their land and houses, and still tend flocks and crops in some of the old walled gardens. About 40 of the old houses have been restored, including a few with toilets and running water, Ibrahim said, and recently it has become possible to arrange overnight stays in these buildings, a far better idea than lodging in local hotels, which are neither conveniently located nor particularly attractive.
The restored houses, generally comprising two to four minimally furnished bedrooms off a highly decorated traditional living room, are beautifully adorned with rich, red wall-hangings, and are chock-full of opportunities to learn about a very different culture. For example, handicrafts that are woven of palm leaves and look like Southeast Asian hats actually are covers to protect food from sand and flies. The numerous mirrors have nothing to do with vanity, but are placed to amplify as much as possible that shaft of light that enters from a single opening in the roof.
The visitor who wants to try an overnight stay should make that clear in advance to a booking agent or guide.
A traditional lunch in an old home, followed by a rest from the heat of the day, is easily obtained, though this, too, should be requested in advance, especially if you want to try camel meat, which is tender, fat free, and not at all strange to the taste.
Without Ghadames, Libya still would be a big attraction for cultural tourists. Roman and Greek ruins, intermingled with artifacts of the Phoenicians who went before and the Arabs who came after, make the country's historical sites perhaps the most complete composites of Mediterranean civilization anywhere.
Leptis Magna and Sabratha are designated World Heritage sites where the excavations bring into vivid focus how the first small colonies were established, conquered, and reconquered by a succession of classical civilizations, then destroyed by earthquakes and barbarians, and built again, first by the Byzantines, then by Arabs carrying word of a new, all-conquering faith.
These two cities and Oea formed a three-city region (''tri polis" in Greek), which was the origin of the modern name of the Libyan capital.
The excavations even reflect the continuity of clashing civilizations into modern times. They were done largely during the most recent period of Italian colonization, from the aftermath of World War I to the 1940s. Italian dictator Benito Mussolini was anxious to uncover evidence that Libya was historically part of Rome. Thus, he poured great energy and resources into excavating and conserving the Roman ruins, while areas thought to hold earlier Phoenician ruins were bypassed, and remain scantily explored to this day.
Long streets, exquisitely carved marble, great temples, public baths, and theaters are on view both at Leptis Magna and Sabratha. Sabratha has an array of fine mosaics, while at Leptis Magna a large amphitheater, a monumental arch honoring the Leptis-born Roman Emperor Septimius Severus (AD 145-211), and the ancient port have been excavated.
Leptis Magna had more than 80,000 residents at its height in the late second and early third centuries, and the excavations are vast, so it comes as something of a surprise to learn that only 20 to 30 percent of the site, which is estimated to cover about 1,500 acres, has been unearthed. The city shrank to a town and then to a village during successive conquests by Vandals, Byzantines, and Arabs. It died out around the 11th century, and some unexcavated portions are covered by nearly 20 feet of sand and dust that blew in over the next millennium.
Local guides say home stays and small hotels are available in Leptis Magna for those who do not want to make the three-hour round trip from Tripoli, but as Minister of Tourism Ammar el-Tayef acknowledges, ''Libya is still poor in tourist hotels and spas." The government's goal, he said, is to have the private sector in Libya and foreign investors build new hotels with a total of 100,000 beds by 2010.
Eltaief also said there are no obstacles from the Libyan side to travel to the country by US citizens, and that foreigners have misinterpreted signs posted in some Libyan embassies stating that tourists must apply in groups of at least four and obtain their visas through a government-approved travel agency. He said the lists of licensed agencies are offered as a convenience to visitors, who are not required to use them nor to travel in groups of four or more.
This runs directly counter to exchanges between would-be tourists and Libyan consular officials that were witnessed by a Globe reporter in the Libyan embassy in Cairo, where couples and individuals from Europe were referred to the agencies as the first step in the visa application process. A notice on the consular bulletin board said travelers were required to be in groups of four or more. And the first US tourist group to visit in recent years, which wrapped up its trip in early May, lost six of its original 16 members, according to the tour leader, because the Libyan authorities would not guarantee before the group left the United States that its visa applications would be approved.
What this all adds up to is that a trip to Libya from the United States is now possible for the first time in many years, but the traveler wishing to be independent should be prepared to spend substantial time and effort making advance arrangements.
Those who are taking the leap feel it well worth the bother.
Thomas and Ellen Flannigan, Chicago lawyers and veteran cultural-adventure tourists, arrived in early May in time for Ellen to celebrate her 45th birthday and elder daughter Erin her second. Nine-month-old Megan also was in tow.
Thomas, 51, who previously arranged trips to Cuba, Albania, Algeria, Iran, Syria, Uzbekistan, and Eritrea, among other places, was still shaking his head that their efforts in 2002 to attend a World Cup match in North Korea had failed, but he believed they were the first Americans to travel independently to Libya since the thaw.
''We just love to travel," Ellen said, ''and it's so hard to find places off the beaten path."
The Flannigans said they do not go to dangerous places (Thomas gave Chad, Democratic Republic of Congo, and Afghanistan as examples), but they find countries that many Americans think of as dangerous to be completely safe, welcoming, and refreshingly noncommercial.
''I still love Paris, and I love shopping," Ellen said, ''but it's so nice to find someplace so relaxed, and where I'm not under the gun to buy something.
''Besides," she said, gesturing at her daughters, ''these are day-care babies, and day care is closed for two weeks. We had to do something."
Charles A. Radin is the Globe's Middle East bureau chief.