GIRONA, Spain -- As in towns across this wealthy northwestern region, the maze-like cobblestone streets of Girona's medieval quarter are fluttering with flags in favor of Catalonia's independence. Here, however, there is also a smattering of flags bearing the slogan: "Catalonia, A New European State."

It goes to the heart of a Catalan conundrum.

While the separatist dream of millions has never felt so close to becoming a reality, independence fervor is now coming up against the cold, hard facts of what breaking free would really mean. Few realize that this Spanish region famed for its trading prowess would be shut out of the European Union for years, a huge hurdle to doing business with its most important trading partners. EU officials say an independent Catalonia would face the same membership conditions of any other candidate nation.

Catalonia holds elections on Sunday that will be seen as a test of the regional government's plans to hold a referendum on independence, and one of the key issues emerging is the theoretical place of a free Catalonia in Europe.

Polls suggest that many Catalans haven't thought through the consequences of freedom.

A survey published by El Pais newspaper this month showed that while nearly half of Catalans support independence, the number drops to 37 percent if it means being out of the EU.

Tough membership conditions aren't the only thing possibly standing in the way. The European Union's treaty states that each of the 27 member states can veto a candidate nation's accession, meaning that a vengeful Spain could block Catalonia from joining the club.

"Now we want to be a state inside Europe," said Josep Matamala, who, along with friend Miquel Casals, created the banner that combines the slogan of EU aspiration with the red-and-yellow stripes, blue triangle and white star of the "estelada" flag that symbolizes Catalonia's independence drive.

Catalonia's regional president, Artur Mas, who is leading the independence charge and holding rallies bristling with European Union flags, has voiced optimism — perhaps mere wishful thinking — that an independent Catalonia would be swiftly embraced into the EU fold. In a recent speech in Brussels he declared: "Catalonia has never in its history let Europe down, now we trust Europe will not let us down."

And there are pro-independence voters who simply can't fathom being cast out of the EU.

"I imagine that if faced with a majority of Catalans who vote yes for independence in a referendum, (the EU) wouldn't be able to turn its back on us," said 35-year-old Girona music teacher Merce Escarra

Girona, one of Spain's richest cities, is an example of what Catalans call "seny" — roughly the equivalent to "practical sense." It typifies the Catalan character of being hardworking and businesslike. But these days, Girona, like the rest of Catalonia, is experiencing an outburst of "rauxa," seny's polar opposite, meaning "wild exuberance." And the source of that is a separatist passion ignited by Spain's ongoing economic crisis.

In 2010, Escarra featured in the local press when she was asked by the owner of the building where she lives to remove the "estelada" flag from her balcony. "I said I had a legitimate right to protest and left it up, and it has been there ever since," she said.

Two years later it is difficult to find a building in Girona that isn't bedecked with the red-and-yellow Catalan flag or the pro-independence "estelada."

"Now there has been a boom in the pro-independence movement," Escarra said. Her reasons for wanting independence are representative of millions of Catalans: The region pays more than it receives back in taxes; its infrastructure has been neglected by the central government; and independence would ensure the survival of the Catalan language.

The regional government calculates it contributes €16 billion ($21 billion) more than it gets back. Other wealthy regions in Spain also pay more, but many Catalans feel that infrastructure projects like the Mediterranean rail corridor are left unfunded, while Spain's high-speed passenger train network is extended to its less industrialized regions.

In recent years, grassroots pro-independence groups have held unofficial referendums on independence in towns across Catalonia. This "fake-it-till-you-make-it" attitude has found an extreme expression in dozens of Catalan villages, which have declared themselves "free Catalan territories."

But symbolism's one thing, hard economics another.

While most of Catalonia's business community is taking a wait-and-see attitude, Jose Manuel Lara, the president of media giant Planeta, said he would move his company from Barcelona to Spain if Catalonia went independent, in order to remain based in the EU.

Ramon Tremosa, a European parliament member from Mas' pro-independence party, said that Catalonia's fate would hinge on pressure being applied on Spain by other European powers and the multinational companies established in Catalonia, which would be anxious for a quick return to business as usual in the common market.

"I can't imagine the 4,000 multinationals (in Catalonia) allowing themselves to be expelled from the EU, from the euro and the free movement of goods and capital, it's not realistic," Tremosa told The Associated Press. "Spain would not be able to stop it because it is heading toward a bailout."

European law experts were uncertain about how quickly an independent Catalonia could join the EU. "It is unknown territory," said Andreu Olesti, an international law and economics professor at the University of Barcelona.

Nicolas Zambrana, professor of international law at the University of Navarra, was pessimistic about Catalonia's EU prospects.

"Spain would be in a good position to prevent Catalonia from returning to the EU," he said.

Both the El Pais poll and a second poll published in Barcelona-based newspaper La Vanguardia indicate that Mas' CiU party has lost steam and would not make significant gains in Sunday's elections, putting into question whether Mas will be able to claim a mandate to push for a referendum. El Pais surveyed 2,500 people by telephone from Nov. 8 to Nov. 15. The poll's margin of error was plus or minus 2.5 percent.

"I am not supporting independence because I feel it is waste of time. I have no hope it will change the social situation here," said John MacKay, a 54-year-old teacher from Barcelona.

And the idea of a fledgling Catalan state left out in the European cold is giving some independence supporters second thoughts.

"It worries me," said Monica Casares, a 41-year-old mother of two who lives just north of Barcelona. "Taking into account that we would face a Spanish boycott on Catalan products for sure, and that we would also have to pay more on exports, we would have a big problem."

But Matamala insisted that the EU would soon come around to the benefits of embracing a rich and dynamic Catalonia.

"Who is going to kick us out of Europe?" said Matamala. "I can't conceive of it."