There are thousands of people in Spain right now who feel that they are on the cusp of something very important – a revolution, even. The streets of Madrid are thick with a sense of optimism and hope, crammed with protesters of all ages carrying placards and posters, many scrawled with slogans such as "They do not represent us!" and "In defence of our dreams!".

The city's main square has become a tent city, occupied by groups inspired by uprisings across the Arab world. Everywhere you look, there are banners demanding change and "real democracy".

No one had seen it coming, not even the activists. What started as a fringe protest against rising unemployment and the Spanish government's multibillion-euro bank bailout escalated after several activists were arrested by police and held for 48 hours.

A demonstration against the arrests was organised in the city's main square, Puerta del Sol, and numbers soon snowballed when word got out over the internet. What began as a group of fewer than a hundred activists reached an estimated 50,000 within less than six days.

The protesters whose arrests had sparked the initial demonstration were released and immediately returned to the square. By the time they arrived, the demonstration was no longer just about their treatment at the hands of the police. It was about government corruption, lack of media freedom, bank bailouts, unemployment, austerity measures and privatisation.

"We cannot find a job, we cannot find a house, we cannot find health from the state," said Alejandro Jalón, a 20-year-old student. "I am here because I think we can change something."

Consensus approach

The young people's sense of optimism is sincere. The protesters at Puerta del Sol are interested only in action, not rhetoric. In the square, they built a makeshift campsite, including everything from a children's nursery and a library to a kitchen offering free food donated by local businesses.

In the space of a few days they had created separate working commissions to form proposals for change to current government policy. A social and migration commission would look at immigration policy, the health commission would focus on how to deprivatise health-care services. Other commissions were formed to handle politics, education, the economy and the environment.

Among the camp's immediate demands were calls for electoral reform, the dissolution of the Spanish parliament's second chamber, and an end to a much-despised policy of "salaries for life" for politicians.

The movement itself has no single leader or figurehead; all decisions are made by consensus at general assemblies, held twice daily. Hundreds, sometimes thousands, attend the meetings, and no decision is taken until every single person is in agreement.

The meetings are long and laborious – occasionally lasting more than four hours at a time – but seem so far to have been successful.

"The leadership is our assembly, where the decisions are taken by consensus," says Nadia Moreno, 29. "Many people think that this doesn't work – the reality is we are where we are after six days because of this consensus."

Hopes for a new society

Although the movement is driven by highly political young people between the ages of roughly 20 and 35, a large cross-section of Spanish society appears to support the occupation of the square. There is a festive atmosphere, with families, music and workshops of every kind imaginable taking place throughout the day. Everyone who attends is encouraged to submit suggestions, using ballot boxes, to each of the commissions. All of these are later scrutinised, tabled and debated.

The organisers say that they think the huge success of the camp, which has since spread to more than 60 other Spanish cities, stems in part from what has taken place in Tunisia and Egypt.

"Egypt and Tunisia was a very important catalyst for the movement in Spain," says Beatriz Pérez, a 29-year-old spokeswoman for the movement who also acknowledges the influence of the recent UK student protests.

"I think the people are in the street because they have hope – that's the most important thing," she says.

The feeling of hope is such that many at the camp believe it could be the start of a social and political revolution. It is the first sign, they say, that the uprisings across the Arab world are about to spread across Europe.

Manuel Ferreira, a 66-year-old retired engineer, says the scenes at Puerta del Sol remind him of the student protests in France during the summer of 1968. "It's the same war against capital, against power, against politicians, against the establishment and so on," he explains. "It [the Puerta del Sol protest] is more significant, because through Facebook and the internet, this movement is worldwide . . . I think I am living a new world order."

The start of the demonstrations coincided with regional elections across the country, which the right-leaning Partido Popular (People's Party) won by a landslide.

At one point last week, an electoral committee assembled by the government declared the camp "illegal". But even though there were strong rumours of an impending police "clean-up" operation, and seven riot vans gathered at one side of the square, protesters have remained at all times in a defiant spirit.

"If they take us from the square tomorrow, the only thing that they will get is that they will make us stronger and we will come back stronger," says 22-year-old Juan Martín. "We want a new society. This one doesn't work any more."

Ryan Gallagher is a freelance journalist based in London. His website is here.