In the marshmallow town of old Ghadames, the plaster corridor wound just below the surface of the cinnamon desert. Gradations of light filtered in through overhead openings so that we turned from black to amber to shadowy yellow as we hurried along the strange sunless groove.

Sometimes, we stepped out into courtyards where the light, bouncing off snow-white crenellated colonnades and window ledges, was so strong it stung.

Ibrahim, our guide, led us up some steps into a small low room with walls decorated with tiny mirrors and brilliant scarlet lacework patterns that might have been sketched in blood. He had the melancholic dignity of a farmer forced by his accountant to sell a favourite dog. "Unesco say they will help, but they have sent no money," he sighed.

From the roof terrace, we could hear the chattering of small birds shaded in the date palms that sagged over the back gardens. Beyond the parapets we could see the sharp edges of the new town which the Libyan government has built for the people of old Ghadames.

For 5,000 years, their ancestors controlled the great caravan routes that tied central Africa to the Mediterranean. Now nobody lives in old Ghadames. The mosque is in ruins, destroyed by a Franco-American air raid in 1943 which crept over the dunes from Algeria to attack the Italian garrison in the Ottoman fort and instead, in 10 minutes, killed 40 civilians and smashed 70 houses.

The fort, now aflame with oleander, is the town museum, dusty and neglected.

Libya has little tourist infrastructure, but the country is still capable of expressions of great and dumbfounding beauty. At my hotel in coastal Sabratha, the bathroom floor was permanently flooded, but the window framed a triple-decker Roman theatre, a stupendous panel of pink pillared stone propping up the evening sky. At Ghirza, a shrivelled stonescape 200 miles south-east, a Bedouin hot-wired a battered van to take us, pitching violently, to the six ancient temple-tombs where friezes dripped with grapes and pomegranates.

A visa cost £120, but all Libyans I met were courteous, kind and honest. Even the intermittent desert road blocks, staged by soldiers puzzlingly camouflaged in willow-pattern blue, were executed with all the rigour of boy scouts policing parking at a Sunday School barbecue. No one demanded to inspect my passport or lumpy rucksack before laconically tilting skywards the great pole counterweighted with its straw pannier of rocks.

The slogans on banners and posters exercised a curious appeal: some - "The permanent relation between people, not Government" - made a kind of endearing sense. Others - "Africa is the resort shield, tear and trench" - were frankly inexplicable.

Outside Garian, on the baking rim of the thyme-strewn Saharan escarpment, we clambered over an ancient granary, honeycombed with vaults where Berber tribesmen stored olive oil and winter barley. The fair-skinned Berbers were the first inhabitants of this 680,000 square-mile slab of northern Africa, if you discount the claims of poor Psylli who, Herodotus tells us, waged war on the south wind and duly perished in a sandstorm.

Much of it was useless for agriculture, but the fertile 1,200 mile coastal strip, where three-quarters of the five million Libyans still live, drew Levantine, European and Arab wanderers seeking lebensraum and access to the trans-Saharan trade in precious metals, ostrich feathers, and humans. (The last Saharan slave caravan ran in 1929.)

The Phoenicians settled 3,000 years ago, and were followed at erratic and bloody intervals by Greeks, Romans, Vandals, Arabs, Sicilian Normans, Genoese pirates, the Knights of the Order of the Hospital of St John, Turks and Italians.

During the second world war, the British and German armies were locked here in a death struggle, partly over access to Persian Gulf oil. Little did they know that they were sitting on several hundred million gallons of the stuff.

The state has used its hydrocarbon revenue to fund fine roads as well as a cantankerous foreign policy. I hitched a ride for a few days in a 14-ton expeditionary truck run by the UK adventure holiday operator Dragoman, and we roared for hours through a parched landscape with all the ease of a Sunday morning cruise on the M6. The highway ran straight and empty to the hot horizon, like the finger-tracing on a frozen pool which exposes the charcoal ice below.

Here and there, the finger strayed from the straight line, and the truck was forced to work cautiously round the edge of a dune that had lunged across our track. Periodically, we passed bus carcases on their side and buckled cars hard up against gulch walls, the sand lapping over the steering wheels.

Three camels, with skins like frothing coffee, stalked stiffly by, one with a giant "X" branded into its right hind leg. We overtook a van heaped high with green foliage lopped from goodness knows where. As the sun rolled west, tiny shrubs scratched through the darkening dustbowl, looking like grouse on a Scottish moor.

The truck, named Carmen Electra, lurched off-road and we pitched our tents in a saucer of red dust and strange pale-green berries the size of ping-pong balls. Overhead, the night sky glistened like a jewelled aubergine. Leaning against Carmen's spare wheel to steady our binoculars, we could make out one of the moons of Jupiter.

Next morning, we continued north through the crusted plateau. Pliny talked of the region's "wilderness of elephants", but we saw only camels and a scrawny rabbit. After Carmen had wound down the ragged edge of the escarpment, random gravel pits and car dumps signalled the approach of civilisation. At dusty Azizyah, 30 miles from Tripoli, there were the first commercial clumps of olive trees, brought to North Africa by the Phoenicians and then mass-cultivated by the Romans, who planted 15 million of them. Near the barracks where the US airforce bombed Gadafy's quarters in 1986, a sheep stood on its hind legs and munched olive leaves, like an old man chewing tobacco. The Dragoman caravan halted for 48 hours in Tripoli, a comfortable and atmospheric city where fig trees and Italianate balconies distribute calm and shade over gouged-up pavements. In the market of the old city, dates were smeared like honey into straw urns, and lamb joints hung festooned with green ribbons of coriander and parsley. Dark Tuareg faces wrapped in cotton shashes, strode past air-conditioned offices. The regime has relaxed the rules on private enterprise: I bought a tape of Libyan reggae music for £1 and a huge sugared doughnut from a street vendor for 8p.

A stone's throw from the old city, the Byzantine citadel of Assaray-al-Hamra has been converted into Libya's national museum. It has many stunning relics of the different occupations, most particularly delicate mosaics which have the finesse of a Flemish tapestry. Many were prised from Roman floors at Leptis Magna, the antique metropolis 120 miles east of Tripoli, still two-thirds buried under sand.

"The city of white shadows" lasted for a millennium and died a dune-choked ruin 12 centuries ago, undone by nature, war and human greed. Broad avenues of paving stones slice like trenches through the concealing tundra to the skeleton of great public buildings where the words "Imperator" and "Britannicus" still glitter among the debris arranged in neat rows by Italian archaeologists. Their rusted railway track worms past snapped segments of emerald pillars and sandstone blocks the size of wardrobes. We scrambled up the 30ft crest of a crumbled basilica and across amphitheatre seating scratched with mystic symbols, like a knitting pattern. The outline of a four-chariot hippodrome still prances along the beach.

How vast and wonderful it must have looked to the nomadic herders but, with Rome in chaos and the military corrupt, Vandal and Arab doggedness broke down the walls that kept chaos and the desert out. The south wind won again, a fact the revolutionary father of the people will remember as he weighs finite resources against the remorseless tribesmen of the tourist dollar.

The practicals

Dragoman (10728 861133) offers four week adventure holidays, through Libya and Egypt, departing Tunis, from £835 plus £505 kitty. Details of this and other adventure itineraries in over 80 countries throughout Africa, Asia and the Americas from www.dragoman.co.uk. British Airways (0345 222111)operates three flights a week to Tripoli from Gatwick. Apex fares are available from £380 plus taxes.