RIYADH (Reuters) - Climb the rickety ladder through the Emir Omar bin Saud Palace courtyard in crumbling Diriyah and the image of old Saudi Arabia suddenly appears in an adobe roofscape set against dark green palms.
The caramel tones of the mud walls, the smell of dust mingling with water and the muffled clanging of hammer on stone belong not to the kingdom's impoverished past, however, but a restoration project costing at least $133 million (82.2 million pounds).
It was in Diriyah that the ruling al-Saud family first rose to power, and in memorialising its ruins, the authorities are celebrating a telling of national history that puts the dynasty and its clerical allies front and centre.
As capital of the first state built by the al-Saud in alliance with the revivalist cleric Mohammed ibn Abd al-Wahhab around 270 years ago, Diriyah is the Saudi Camelot.
"Diriyah is symbolic. It's about going back to your roots. The whole idea of the Saudi state started in Diriyah," said Khaled al-Dakhil, a political science professor in Riyadh.
In school text books, national day posters and programmes on state television, the alliance and its revival under the modern kingdom's founder Abdulaziz ibn Saud is portrayed as delivering the nation from centuries of infighting and superstition and bringing unity, religious enlightenment and oil wealth.
It's a version of events that, while perhaps not applauded by some critics of the government and people from parts of the country that were conquered by the al-Saud, nevertheless has solid roots in history.
The partnership of princes and clerics survived Ottoman invasion, tribal feuding and a transformative oil boom to become the political fulcrum of a country many times larger than the remote desert emirate it succeeded.
While the al-Saud and their Wahhabi creed gained recognition and influence internationally, Diriyah fell to ruin.
By the early nineteenth century, it was the largest town of the central Arabian Peninsula, its stout walls enfolding grand palaces for its princes, a treasury, a bath house and a large mosque.
But it was bombarded and burnt to the ground in 1818 by the cannons of an Ottoman army sent to crush Wahhabi fighters who had captured Mecca and Medina and raided southern Iraq.
Its wells were filled up and its palms cut down. Every archaeological dig uncovers a layer of ash, said Ali al-Moghanam, a historian working as an adviser on the project for the government body carrying it out.
The Saudi family and its followers trudged a few miles down Wadi Hanifa to resettle at Riyadh and Diriyah slowly melted into the desert. Today it is almost a suburb of northwest Riyadh.
Behind the ruins are a large pit where workers are making some of the one million mud bricks needed for the project. UNESCO accorded Diriyah world heritage status in 2010.
"Authenticity is very important to UNESCO - making sure the modern intervention is well marked," said Thomas Ciolek, senior project manager on Diriyah for the Arriyadh Development Authority (ADA), the government's overseeing body.
The restorers envisage that Diriyah will become an open-air museum, with elevated steel walkways that will guide visitors through the shaded alleyways and towering palace walls that survived the Ottomans.
Abdullah Arrukban, director of urban development at the ADA, was not able to say exactly how much the restoration cost, but estimated that it was more than 500 million rials ($133 million).
Ruins have been strengthened with internal titanium rods and freshly plastered using traditional methods, but have not been rebuilt, retaining the jagged silhouettes moulded by cannon shot and centuries of erosion.
When the project is complete - probably in early 2015 - it will use exhibits to detail the political history of the first Saudi state and its destruction, and of the life or normal people before the oil boom.
"It is important to make Saudis aware of their history and proud of their history," said Ciolek.
From the replastered and crenellated walls of old Diriyah, visitors can clearly see the 99-storey Kingdom Tower in central Riyadh, built by a billionaire prince and direct descendent of the old town's original rulers.
Modern Saudi Arabia is a nearly absolute monarchy, with no national elections or political parties. The al-Saud family hold most top government positions, ruling with the backing of Wahhabi clerics.
Senior clerics and big religious institutions are lavishly financed by the state, spreading Abd al-Wahhab's message across the world.
The clerics describe their movement as "reformist", and those reforms will also be memorialised in a large exhibit in restored Diriyah.
"It's not only a local reform movement. This is for the Muslim countries. The reform movement is to free people in their faith. To make people more than they are," said the historian, Moghanam.
For Saudi critics and some people outside Najd, the arid central part of the Arabian Peninsula where Diriyah is situated, the careful preservation of these ruins is starkly contrasted to the treatment of other parts of the kingdom's heritage.
Some historic buildings in Mecca, for example, which was conquered by the al-Saud in 1924, have been allowed to decline or even in some cases been razed to make way for modern buildings.
"This historical focus undermines two important dimensions: first the contribution of many people in Saudi Arabia towards this state project, and also the role of conquest in it," said Madawi al-Rasheed, the author of "A History of Saudi Arabia" and a critic of the government at London's King's College university.
Some other Saudis say the fact that Diriyah is still relevant to the modern kingdom underscores a divergence between the comparatively rapid pace of social and economic change and the much slower rate of political reform.
"Diriyah for the population does not seem to be very long ago, even though it's 250 years. That's because the relationship between the people and the ruling family didn't change very much. But this idea of government cannot remain because society itself has changed," said Dakhil, the political scientist.
Editing by Sonya Hepinstall