A coalition of separatists who promised independence for the Spanish region of Catalonia has won the regional parliamentary elections.
With 99 percent of Sunday's vote counted, the "Together for Yes" group of secessionists had 62 seats in the 135-member parliament.
If they join forces with the left-wing pro-independence Popular Unity Candidacy (CUP) party, which won 10 seats, they will have the 68 seats needed to try to push forward their plan to make Catalonia independent from Spain by 2017.
OPINION: Podemos and the Catalan cause
But CUP had insisted that it would only join an independence bid if secessionist parties won more than 50 percent of the popular vote. They won only 48 percent because of a quirk in Spanish election law that gives a higher proportion of legislative seats to rural areas with fewer voters.
Still, Catalonia leader Artur Mas claimed victory as a jubilant crowd interrupted him with cheers and chants of "Independence!" in Catalan, which is spoken side by side with Spanish in the well-off and industrialised region bordering France.
"As democrats we were prepared to accept the defeat. Now, we demand that they accept the victory for Catalonia and the victory of the 'yes'," he said.
Tensions with Madrid
Many Catalans who favour breaking away from Spain say their region, which represents nearly a fifth of Spain's economic output, pays too much in taxes and receives less than its fair share of government investment. Independence sentiment grew during Spain's near economic meltdown during the financial crisis.
Mas had promised to launch a road map towards independence by 2017 if he won a majority in the regional parliament.
After the Spanish government blocked him from holding a straight referendum on secession, Mas framed Sunday's vote for the regional parliament as an indirect vote on independence, heightening tensions with Madrid.
Al Jazeera's Jonah Hull, reporting from Barcelona, said the result of the vote "could set the stage for a political and constitutional crisis in Spain, and possibly, beyond".
"Confronting this popular will for independence is the government in Madrid. It says the Spanish constitution specifically precludes any unilateral moves to break up the union. It has successfully used the constitutional court to block such moves and will continue to do so," our correspondent said.
Spain's ruling conservative Popular Party dismissed the result and said it would keep fighting against the independence drive.
"The government will continue to guarantee the unity of Spain," its spokesman Pablo Casado told reporters.
Source: Al Jazeera and agencies