Catalan President Artur Mas (center) stands with ERC's Oriol Junqueras (right), Raul Romeva (2nd left) and other politicians as they address Junts Pel Si (Together For Yes) supporters after polls closed in a regional parliamentary election in Barcelona, Spain, Sept. 27, 2015. Separatists won a clear majority of seats in Catalonia's parliament in an election that could set the region on a collision course with Spain's central government over independence. Reuters

The red and golden stripes of Catalonia's flag blanketed Barcelona Sunday as separatists celebrated the region's most significant step toward independence in decades. But miles away in Madrid, the festivities represented anything but good news.

Spain's sluggish recovery is facing new threats from a growing independence movement in Catalonia. The region accounts for nearly 20 percent of the nation's gross domestic product and its mighty banking, retail and tourism sectors have propelled growth across Spain in recent years as Madrid weathered staggering unemployment rates and a bulging government deficit. But with Spain's economy finally showing signs of a turnaround, Catalonia's potential departure could stall Madrid's latest efforts to create jobs, strengthen consumer confidence and maintain its national output.

"Given Spain’s fragile economic recovery, this is the last thing the country needs," said Simon Tilford, deputy director of the Center for European Reform in London, which studies economic trends in Europe. "If Catalonia leaves Spain, this could be formidable because it is one of the most dynamic bases of the country's economy."

Pro-independence groups won a majority of local seats in Sunday's voting, which was framed as a referendum on Catalonia's independence. Roughly 48 percent of the vote went to pro-independence parties, with the “Together for Yes” ticket winning 62 of the 135 seats in the Catalonia Parliament, allowing it to create a majority government by teaming up with the smaller, more radical Popular Unity Candidacy, which won 10 seats.

“We have a democratic mandate; we have won against all odds,” Artur Mas, the regional leader who called the vote, told supporters in central Barcelona as the votes were tallied. “Just as we, as democrats, would have accepted defeat, we ask that others recognize the victory of Catalonia and the victory of the Yes” movement for independence, he added.

Fueled by regional pride and rising tax demands from Madrid, separatist leaders want Catalonia to secede from Spain, but remain a European Union member. The ruling Popular Party of Prime Minister Mariano Rajoy in Madrid has responded with stern warnings that further steps toward independence would be struck down by the courts and end in the removal of Catalonia secessionist politicians from office.

Spain is the eurozone's fourth-largest economy and was once considered a rising economic power. But the 2008 global recession hit Spain hard and Madrid has since slowly limped toward a recovery. Spain's second-quarter unemployment rate fell to 22.4 percent this year, its lowest level since 2011, and its national output is on course to grow by about 3 percent by 2016. But the recovery has largely been driven by temporary factors, critics note, such as a surge in foreign tourism, the depreciation of the euro and lower oil prices.

“We can now say something that was unthinkable just a few years back: that we have gone from being responsible for half of the job losses in the European Union to creating half of new jobs in the EU,” Rajoy said in July, the Wall Street Journal reported.

Rajoy's efforts to embrace fiscal austerity will be put to the test in December during what is expected to be a tough re-election campaign. A bruising battle in Catalonia will likely further hurt his standing in the polls if Madrid cannot deliver more jobs, analysts have said.

"It’s clearly not going to go away," Tilford said of the independence movement, noting Catalonia is "a net fiscal contributor to much of the country. It pays more in than it gets out."

Catalonia represents 16 percent of Spain's population of 47 million people, making it the second biggest region after Andalusia in the south with 8.4 million residents. Nearly 73 percent of Catalonia's inhabitants speak Catalan instead of Spanish.

The northern region bordering France and the Mediterranean Sea made nearly 200 billion euros last year, representing about 20 percent of Spain's economy. It's home to business giants such as retailer Mango and Gas Natural, and pushes out about 25 percent of all Spanish exports. It also draws more foreign tourists than any other Spanish region. Roughly 16.8 million tourists visited Catalonia last year, representing a quarter of Spain's tourism sector.

The push for independence isn't just troubling news for Madrid and less wealthy regions that count on Barcelona's tax dollars. European officials have suggested an autonomous Catalonia could hurt business leaders in Barcelona, despite the region's thriving economy. Madrid has said Catalonia cannot remain part of the European Union as a sovereign nation, which could have implications for Spanish banks headquartered in the region that rely on European funding. European Central Bank board member Luis María Linde, the head of the Bank of Spain, said last week CaixaBank and Banco Sabadell would not be able to tap into European funding if the region was no longer part of Spain, the Wall Street Journal reported. The stern rhetoric has seen some Catalonia bank stocks tumble in recent days.

"What would happen with financial institutions, what would happen with bank deposits, to the currency?" Rajoy asked in a recent radio interview.

Catalonia has also struggled to address its debt in recent years. It's the third most indebted of Spain's 17 semi-autonomous regions and its debt in the second quarter of this year was equivalent to nearly a third of its GDP. Meanwhile, the unemployment rate in Catalonia was 19.1 percent earlier this year, AFP reported.

For separatist leaders, however, any downsides to an independent Catalonia have largely been downplayed amid calls to honor the region's unique cultural traditions and to break free from Madrid's fiscal mandates.

"I have wanted independence ever since I was young," Jordi Perez, a 50-year-old civil servant, told the New York Times after voting in Barcelona. "During three centuries they have robbed us of our culture. We have reached the moment that the Catalan people say 'enough is enough.' "

Spanish GDP Per Capita Growth Over Time | FindTheData