MADRID--A day after a majority of Scots voted against secession from the U.K., the parliament in the wealthy, industrial Spanish region of Catalonia approved a law to allow for its own, albeit nonbinding, referendum on independence.

The 106-28 vote Friday set Spain on a path toward a legal and political crisis. The central government in Madrid has vowed to block the referendum, which it says is unconstitutional.

After the law is published in the coming days, Catalonia's regional president, Artur Mas, is expected to sign a decree formally convoking the referendum for Nov. 9. At the Spanish government's request, the Constitutional Court is then expected to issue an injunction to halt the vote.

Mr. Mas has expressed misgivings about going ahead with the referendum in violation of Spanish law because the vote might lack international credibility. Another way for him to satisfy pro-independence groups clamoring to cast ballots would be by calling early regional elections as a proxy vote.

During the Catalan parliament's 2 1/2 -hour debate, many speakers took note of the historic nature of the proceedings.

"Democracy without liberty is a sham and we want to vote--not a sham," said pro-referendum congresswoman Dolors Camats.

Albert Rivera, leader of the Citizens' Party and an opponent of the referendum, said that those advocating it were being irresponsible. "This isn't a day of celebration, but of worry because these separatist movements have a sword over Europe's head," he said.

Catalan separatists complain that the government in Madrid drains the region of tax revenue without offering sufficient respect for its language and culture. Spanish government officials maintain that Catalonia receives economic benefits from being part of Spain and has plenty of autonomy under the constitution.

Overshadowing the parliamentary speeches was a national discussion over the meaning of Scotland's referendum. In a measure of the acrimony surrounding the Catalonia question, nearly all major political figures interpreted the Scots' "no" vote in their own way.

Prime Minister Mariano Rajoy congratulated the Scots for having voted for stability and the integrity of the European Union. "They have chosen between segregation and integration, between isolating and opening," Mr. Rajoy said. He didn't mention Catalonia.

EU officials, and Mr. Rajoy, have warned both the Scots and the Catalans that any new states carved out of existing EU members would have to reapply for membership, and wouldn't be admitted easily.

Mr. Mas, while acknowledging disappointment at the result, saw the Scottish referendum as an exemplary exercise in giving a voice to the people. He exhorted Mr. Rajoy to follow the example of U.K. Prime Minister David Cameron by allowing Catalans to vote on their status.

"What happened in Scotland has been a positive lesson in democracy," Mr. Mas said. "That is the only path to resolving this conflict, a democratic response."

About the resounding "no" vote in Scotland, he added: "Whoever thinks this a hurdle for our own process is fooling himself."

The Socialist party leader Pedro Sánchez, who has argued for a constitutional reform that might satisfy Catalan grievances through greater federalism, emphasized the 11th-hour concessions toward greater autonomy that Mr. Cameron offered Scotland to stem the pro-independence tide.

"Scots have chosen self-government over doing nothing or a breakup," Mr. Sánchez said.

Write to Matt Moffett at matthew.moffett@wsj.com

Subscribe to WSJ: http://online.wsj.com?mod=djnwires