King Juan Carlos waves at the closing ceremony of the Constitution celebrations in Cádiz. JORGE ZAPATA / EFE

Two hundred years ago, Spain was immersed in a chaotic and particularly brutal war to expel the forces of Napoleon Bonaparte, which had been occupying the country since 1808.

That year, to secure control of the country, Napoleon persuaded Spanish aristocrats to overthrow the king, Charles IV, and replace him with his son Ferdinand. Napoleon then promptly removed him, handing the throne to his brother, Joseph Bonaparte. A puppet Spanish government approved the new king, but the coup sparked a popular uprising that soon spread throughout the country, throwing together an unholy alliance of nobles and priests intent on protecting the ancien regime, backed by the masses.

As resistance to the French spread, Britain joined in, sending Arthur Wellesley, better known as the Duke of Wellington, to land a force in Portugal. Britain also provided naval support to the Spanish and Portuguese, having already sunk much of the French fleet three years earlier at Trafalgar.

The war dragged on, and got bloodier. By 1812, some 350,000 French soldiers were tied up in Spain, but had still achieved little more than a stalemate, their supply lines constantly harried by Spanish guerrillas.

With the Spanish king Napoleon's hostage in Bayonne, the anti-French forces had created a de facto government in exile, called the Supreme Central Junta, which saw itself as simply holding the fort until the Bourbon monarchy could be restored. Meanwhile, in 1810, Spain's legislative assembly, the Cortes Generales, had taken refuge in the southern port of Cádiz on the Atlantic coast. The city was under siege, but was kept supplied by British warships.

When the Cortes convened in the Real Teatro de las Cortes in Cádiz on September 24, 1810, it was divided into two groups: a smaller number of representatives who wanted to maintain the ancien regime, and a majority, who saw the historic opportunity to create a more liberal political system: a constitutional monarchy.

With the king held hostage in France, parliament took refuge in Cádiz

The representatives who gathered at Cádiz were a far more liberal lot than most of their peers, and they produced a document more revolutionary than might have seen the light of day in Spain were it not for the war. The liberals wanted equality before the law, a centralized government, a modern civil service, reform of the tax system, an end to feudal privileges and the recognition of property rights.

Three basic principles were soon ratified by the Cortes: that sovereignty resides in the Spanish Nation (spelt out in capital letters in the original document); the legitimacy of Ferdinand VII as King of Spain; and the inviolability of the deputies. On the basis of these three principles, the first steps towards a political revolution were taken - until then, Spain had been ruled as an absolute monarchy. The proposed Constitution would reduce the power of the Crown, as well as that of the Catholic Church and the nobility. It also established principles of freedom of thought by banning the inquisition and allowing for a free press.

Work began on the new Constitution, and within 18 months, it was promulgated; on Saint Joseph's Day, March 19. "The object of the government is the happiness of the nation," it declared optimistically. No wonder that Spaniards later dubbed it "La Pepa," referring to it with the diminutive of Josephine.

One of the first examples of conservative liberalism, it came to be called the "sacred code" of the branch of liberalism that rejected the French Revolution. After the American Declaration of Rights and the French Constitution, it was only the third document of its kind, and would serve as a model for the liberal constitutions of several European and Latin American nations.

Two centuries later, distracted by a worsening economic crisis, the prospect of deeper spending cuts, and a looming general strike, today's Spaniards might be forgiven for a lack of enthusiasm for their forebears' achievements.

Even in Cádiz, which has restored the San Felipe Oratory, where the Constitution was promulgated, and which has organized a series of exhibitions and events throughout the year, there is little excitement. Cádiz has the highest unemployment level in Spain, at 35 percent.

The idea was to have a constitutional king; in France they cut his head off"

"Things are bad; there is a lot of unemployment. All we need is a bit of work, and this would be the best place to live in Spain. The shipyards have all but closed down, and the container ships go to Algeciras. There's no money and people are having a hard time," says a fisherman down on the quayside. "Let's hope the celebrations liven things up a bit," he adds.

Over at a small shop by the Cathedral, the owner is franker still: "The Constitution can go to hell! They have better things to spend money on, like creating jobs," says the owner.

The Popular Party's Teófila Martínez, who was elected mayor for the fifth time last year, says that she could have done with some financial support from the Andalusian regional government, as well as from Madrid. Sipping on an aperitif in a local bar, she explains:

"We have been preparing the city for this for years. The place was very run down. We are aware of our responsibility, but let me tell you that in my opinion, this is a celebration that has more to do with the government, with the state, than with just the city. A city can't do something like this on its own, however hard it tries. This goes beyond the local realm," Martínez says.

"We put in a bid for European Capital of Culture, but there was no joy there, so we asked to be the Iberoamerican capital of culture, and we were awarded that. We have put together a program which is modest and within our means. We always understood that this wasn't something we could or should do without Latin America, and the region will be represented over the year through all of the arts," the mayor continues. She says that she wants this year to provide an opportunity not only to put Cádiz on the tourist map, but also for the city to host conferences on the wider implications of the Constitution.

"We want Cádiz to be a place where ideas are discussed. We are hosting a conference organized by young people from eight different Latin American countries and where they will discuss their constitutions and the process by which their countries became independent, and the role that the Constitution of 1812 actually played in these questions."

The government's objective is the happiness of the nation: Article 13

What to do with Spain's empire in the Americas was a key issue for the men who wrote the 1812 Constitution. Representatives from what is today Mexico and Peru were present, but there were no delegates from the regions now known as Venezuela and Argentina. Most of the delegates were criollos, people of Spanish ancestry born in the Americas, and some wanted to grant the vote to the black and mixed-race population, a decision that would have granted the Americas a majority in future Cortes.

Predictably, the Spanish deputies wished to limit the weight of the Americans in any future Cortes and opposed these proposals. Nor were the peninsular Spanish inclined toward any kind of federalism, which would have granted greater self-rule to the American possessions; most peninsular deputies, therefore, shared the absolutists' inclination toward centralized government.

The importance of the Americas was clear from the start: Article 1 of the Constitution reads: "The Spanish Nation is the collectivity of the Spaniards of both hemispheres."

The Constitution defined the Spanish Monarchy as the union of all the Spanish possessions around the world and defined as Spaniards all white or native persons born in both hemispheres or naturalized there. This changed the legal status not only of Spaniards in Spain, but also of people of Spanish ancestry and the indigenous peoples of the Americas from being subjects of an absolute monarch to the citizens of a nation rooted in the doctrine of national, rather than royal, sovereignty.

Nevertheless, the authors of the Constitution wanted to avoid giving American citizens any chance to create political structures in any way proportional to their population numbers.

The question of what to do with the Americas raised the issue of race far beyond those of peninsular Spain. Article 22 explicitly recognized the civil rights of free blacks and mixed-race people. But Article 29 deprived them of automatic political rights.

It is ironic that the century and a half that followed was so violent and unhappy"

Events in the Americas were already moving quickly: after several decades during which its influence waned over its colonies, Spain soon found itself up against a well-organized coalition of landowners and locally born merchants and professionals in Latin America able to rally the masses to its calls for independence. Within a decade, the region would have shaken off Spanish rule.

The 1812 Constitution was an inspiration to the future leaders of the emerging states of Latin America. One provision of the Constitution, which provided for the creation of a local government (ayuntamiento) for every settlement of more than 1,000 people, using a form of indirect election that favored the wealthy and socially prominent, came from a proposal by Mexico's Ramos Arizpe, who would later play a key role in his country's independence struggle.

This provision benefited the bourgeoisie at the expense of the hereditary aristocracy both in Spain and in the Americas, where it was particularly to the advantage of the criollos, who came to dominate the ayuntamientos. It also brought in a certain measure of federalism through the back door, both in Spain and overseas: elected bodies at the local and provincial level might not always be in lockstep with the central government.

Spanish novelist Arturo Pérez Reverte, who has written an engaging account of the events surrounding the writing the Constitution in El asedio (or, The siege), says that the authors of the magna carta achieved much, but could have achieved more.

"The Cádiz Cortes were a major achievement, something quite fundamental, but it was also a missed opportunity. The liberals were unrealistic. They did not understand what was going on around them; they did not understand the art of the possible. The Constitution required other conditions to work. The country was in the hands of fanatical priests, a rapacious king and a reactionary aristocracy, and a piece of paper wasn't going to change that. Which is why it didn't last. We mistook our enemy: it wasn't the French, the enemy was within, as time would later show. The Constitution is a wonderful, failed adventure, and at the same time, it is the seed of so many other successful projects that followed it. Spain would never be the same afterwards."

Despite its influence, the Constitution barely saw the light of day. When Ferdinand VII was restored to the throne in March 1814, he abolished it. Even during those two short years, it was never really in effect, given that much of Spain was under French military occupation, and the other areas were in the hands of interim administrations that were more concerned about seeing off the French than on implementing a new constitution.

Between 1820 and 1823, the document was dusted off again, and then enjoyed another brief period of use between 1836 and 1837. Since the 1837 Constitution, Spain has had six more, including the present one, written in 1978 after the death of General Franco.

Teófila Martínez says that it is important to celebrate the Constitution, saying that today's politicians could learn from the example of their forebears. "I am very proud of them: they were able to overcome their differences and create something for the benefit of Spain. It was a hugely important document - if only we were capable of something like that today."

José María García León, a local historian and expert on the Constitution of 1812, who has written extensively on the subject, praises Martínez for her work, but says that the bicentenary has been a missed opportunity.

"The city authorities have made a serious effort to inform people about this, and I think that people here are, on the whole, proud. What has disappointed me is that there hasn't been more done at the national level. They have pretty much left us alone to get on with it. But this shouldn't be a local thing, and I'm not just talking about the money. How come there hasn't been anything on the television about the Constitution, about the events of those times, no films, or major piece of music to celebrate this? The Ministry of Culture has not gotten involved to the extent it should, and neither has the Royal Academy of History. And the Royal Family has been largely silent: we shouldn't forget that this was a document allowing for a constitutional monarchy; in France they cut the king's head off."

It has to be said that the commemorations have been, well, low key. On March 19, Prime Minister Mariano Rajoy addressed a gathering of the great and good, among them King Juan Carlos and Queen Sofía, in the San Felipe Oratory in Cádiz, noting in a less-than inspired speech: "The government and all state institutions are called on to step up their efforts to create conditions under which all citizens enjoy wellbeing."

"The constitutional reformers of Cádiz taught us not to be afraid of making reforms but to be sufficiently decisive and brave to make them," the conservative prime minister concluded.

King Juan Carlos, for his part, said: "In the work carried out in Cádiz in a difficult historic period, we can find the necessary reference point and inspiration to tackle the serious difficulties that our country is going through at present."

The historian García León says that while the French and the Americans held huge nationwide celebrations to commemorate their respective Constitutions, "Spain has failed. We could have used it as a way to bring us closer to Latin America. The Foreign Ministry has done nothing, neither has the Instituto Cervantes. They consider the Constitution of 1812 more important in Mexico than over here."

He blames the previous two national administrations of Prime Ministers Zapatero and Rajoy for failing to plan ahead. "It's our first Constitution!" he shouts. "An opportunity for us to say to the world, 'Listen, we were already democrats, 200 years ago. We're not newcomers to this.' I think that we have thrown away a golden opportunity. We have failed to take advantage of this, something that could have captured the world's attention this year. And why? Laziness and ignorance. The previous governments just couldn't be bothered. There was nobody with the talent or the energy to make something of this."

There are plenty of people in Cádiz who agree with León, and think that the bicentenary could have been put to greater use in helping the city and its province's economies; that it could have been what the Expo was to Seville or the Olympics to Barcelona in 1992.

The widely held view is that things have been handled badly. Some point to the consortium set up to organize the celebrations; others to the political fighting between the Socialist Party-controlled regional government and the Popular Party administration in Cádiz that has seen both sides organize their own events.

Leaving aside the squabbling and petty fighting between politicians, García León highlights one of the Constitution's more attractive qualities: "It insists on the importance of happiness. This is something that seems very modern to us, very new, and this is something that Brazil's former president, Lula, has talked about. It is a bitter irony that the century and a half that followed was so violent and unhappy," he says.

"The objective of the government is the happiness of the nation, given that the goal of all societies is none other than the wellbeing of the individuals it is composed of," reads Article 13.

With an electorate looking at a future that is going to get a lot worse before it gets better, and with a raft of highly unpopular cuts still to implement, perhaps it is not so surprising after all that today's government decided to play down the celebrations.