Tens of thousands take part in street protests after king says he will step down and pass power to his son Felipe

Tens of thousands of people in more than 60 Spanish towns and cities took to the streets on Monday evening to demand a referendum on the future of the monarchy after King Juan Carlos announced his plans to abdicate and hand over power to his son Felipe.

Police estimated that more than 20,000 people descended on Madrid's Puerta del Sol square, and thousands more on Barcelona's Catalunya square. Solidarity rallies were also held in 30 cities across Europe and Latin America.

The call for a referendum has been bolstered by several online petitions, the most successful of which counts more than 113,000 signatures (and growing), urging Spain's political parties to take advantage of this "historical opportunity to promote a public debate that will help regenerate democracy and determine the future of the monarchy".

Hours after the prime minister, Mariano Rajoy, broke the news, the king took to Spanish television to explain his decision on television. "Today, when I look back, I can only feel pride and gratitude to all of you," he said. "Pride for the many good things we have achieved together. And gratitude for the support you have given me throughout my reign."

Juan Carlos said he decided to step down after his 76th birthday in January. His son Felipe, he assured Spaniards, "has the maturity, the readiness and the sense of responsibility necessary to take on the title of head of state and begin a new era of hope that combines experience and the drive of a new generation."

Once one of the world's most popular monarchs, the reign of Juan Carlos has been plagued by a series of recent scandals that have sent his popularity plummeting. A poll by El Mundo last year found that nearly two-thirds of Spaniards thought the King should abdicate.

Spanish Crown Prince Felipe and his wife, Princess Letizia. Photograph: Ignacio Lopez/EPA

In contrast, Crown Prince Felipe, a former Olympic yachtsman, has come out relatively unscathed. Frequently photographed while taking their two daughters to school or at shopping malls, Felipe and his wife Letizia Ortiz, a former television news anchor, have cultivated an image of leading a relatively modest lifestyle.

Fluent in English, French and Catalan along with Spanish, Felipe studied for a year in Canada before undertaking three years of military training in Spain's military academy. A law degree in Madrid followed, as well as a master's in international relations at Georgetown University in Washington, US. The poll showing rising public support for Juan Carlos's abdication was a stunning reversal of opinion for a leader who in 2012 had an approval rating of almost 80%.

Taking the throne just two days after the death of Franco in 1975, Juan Carlos won the respect of Spaniards by steering the country from dictatorship to democracy, including foiling a coup attempt in 1981. But as Spain fell into financial crisis, the king's standing sank. A particularly low point came when it was revealed he had taken a luxurious trip to Botswana to hunt elephants, just weeks after telling a reporter that he was so distraught about the growing ranks of the unemployed that he was having trouble sleeping.

King Juan Carlos on his €10,000-a-day hunting safari in Botswana, which had been hushed up before he fell and broke his hip. Photograph: Target Press/Barcroft Media

The royal family's image was further tarnished by a long-running corruption investigation into the king's daughter, Princess Cristina and her husband Iñaki Urdangarin.

Many, particularly young Spaniards, began to see the king as part of Spain's problems, drawing parallels between him and the economic and political powers that had driven the country into the economic crisis. While the king's approval rating dropped to around 41%, that of his son remained stable at around 66%, leading many to suggest that the monarchy would be better off if Juan Carlos abdicated.

Spanish media speculated on the timing of the announcement, with many of them musing that the sudden announcement was tied to last week's European election results, in which small leftist, anti-monarchist parties earned 20% of the vote.

It was these parties that seized on the announcement to lead the charge for a referendum.

The Leftwing newcomer Podemos, which shocked analysts by winning five seats in the European elections, spent the day rallying for a referendum on Twitter. "We are citizens, not subjects. It's about time we had our say."

Thousands took to the streets in Madrid to demand a referendum on the future of the Spanish monarchy after an announcement by the Spanish King Juan Carlos of his plans to abdicate. Photograph: Luca Piergiovanni/Demotix/Corbis

Cayo Lara, who heads the United Left coalition, said it was the moment for "the people to decide if they want a monarchy or a republic." He added: "It's inconceivable in the 21st century that we're still talking about blood rights."

Political analysts on Monday linked the abdication of Juan Carlos to another issue facing Spain: the push for independence by Catalonia. As the sole male heir, Felipe has the direct right of ascendancy to the crown under the 1978 constitution. With Felipe in the job of king, it is expected that Spain will change its constitution to ensure that his first-born daughter can succeed him.

The move could pave the way for other proposed constitutional challenges, such as the demands by the opposition Socialists to grant Catalonia more autonomy or financial benefits to quell the region's separatist movement.