The region's nationalist president Artur Mas declared victory to a cheering crowd of flag-waving supporters after an emotional election that has heightened tensions with Madrid.
"We have won," he bellowed, after results published by the regional government showed that his separatist alliance and another pro-independence group won an absolute majority of seats between them.
"We have a democratic mandate... This gives us enormous legitimacy to go ahead with our plan" for independence, Mas told the open-air rally in Barcelona.
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 in Madrid.
Official results with nearly 98 per cent of the votes counted showed Mas's pro-independence alliance will hold an absolute majority in parliament if it teams up with the radical left-wing separatist group CUP.
Mas's Together For Yes alliance secured 62 seats in the regional assembly and the CUP won 10, according to figures published by the regional government.
That gave them a joint total of 72 seats, above the 68 needed for an absolute majority in the 135-seat regional parliament.
Turnout was high at more than 77 per cent after weeks of tense and emotional campaigning in which Spain's leaders warned Catalonia's place in the European Union was at stake.
'Hard work ahead'
The partial results gave Together For Yes 39.66 per cent of the vote, with 8.21 per cent for the CUP - or a combined total of just under 48 per cent for the two pro-independence forces.
Popular Party spokesman Casado argued that Mas had "failed" by not winning a majority of votes and falling short of a majority for his own party.
"He should either resign over tonight's failure or start governing for all Catalans," Casado said.
"This election should serve to end the independence debate once and for all." But Together For Yes had vowed to declare independence by 2017 if it secured a majority in the parliament, even without a majority of votes.
"This is very exciting," said Agusti Raga, 73, at Mas's rally, wrapped in the Catalan nationalist flag of red and yellow stripes overlaid with a white star on a blue triangle.
"I think it will take time, but the important thing is that it starts tomorrow," Raga said. "Ten years ago, no one thought we would get this far." Mas's alliance faces tough negotiations to strike an accord with CUP, an anti-capitalist citizens' movement for social justice, which does not want him to lead the separatist movement.
"We have a lot of work ahead. We will not slack," Mas said. "We have won with nearly everything against us."
Following Scotland, Quebec
After the Spanish government blocked him from holding a straight referendum on secession, Mas framed Sunday's vote as an indirect vote on independence.
Spain's national government under Prime Minister Mariano Rajoy brands secession illegal. It wants the country to stay united as the eurozone's fourth-biggest economy recovers from recession.
With its own language and cultural traditions, Catalonia has seen numerous bids for greater autonomy over the past century.
Secessionist demands have surged in the recent economic crisis, with nationalists complaining they get less back from Madrid than it takes in taxes.
Mas wanted Catalonia to follow Scotland and Quebec in Canada by voting on independence - though in both those cases most voters chose not to break away.
Madrid garnered support from US President Barack Obama and British Prime Minister David Cameron, who have defended the unity of Spain.