A boy waves a Catalan 'estelada' flag during a pro-independence event in Barcelona. Photograph: Emilio Morenatti/AP

Catalan politicians have voted in favour of asking for the right to hold a referendum on independence from Spain – a milestone in years of mass protests by Catalans, who are fiercely proud of their distinct culture and language.

As politicians debated at the Catalan parliament in Barcelona before the vote, dozens of Catalans outside waved independence flags. A smaller group unfurled Spanish flags before the debate began, yelling "Catalonia is Spain!"

But the vote is also largely symbolic: Catalonia can ask Spain for permission to hold an independence vote but Madrid still has the power to say no, and it almost certainly will.

Mariano Rajoy, Spain's prime minister, has repeatedly said he won't allow a Catalonia secession referendum because Spain's 1978 constitution doesn't envision anything but a unified Spanish state, and mandates that referendums affecting Spain must be held nationally and not regionally. He has an absolute majority in parliament that assures he will prevail, and the main opposition Socialist party also opposes a referendum vote.

Still, the vote on Thursday could fan the flames of an already impassioned independence drive, even though it fell just short of the two-thirds majority that supporters hoped for. A strong separatist message may also inspire independence movements elsewhere in the European Union at a time when European unity has been rocked by the economic crisis.

Even if Madrid refuses to allow an independence vote, Catalan politicians might decide to try to hold a referendum anyway. That would put them in perilous legal terrain: when the northern Basque region, where separatist sentiment has also raged, failed to obtain permission for a similar referendum in 2005, Spain said Basque leaders could be jailed if they went ahead and held the vote anyway.

A less extreme scenario would be to use Catalan regional elections as a kind of unofficial referendum, with parties obliged to clearly state where they stand on independence. Under such a situation, any vote for a pro-independence party would be taken as a de facto vote for independence. A big yes turnout would give further ammunition to independence supporters to push for a referendum, with or without Spain's approval.