Voters in Spain's Catalonia region have given a majority to parties seeking Catalan independence.
However, Catalan President Artur Mas, who called the early election and pushed for independence, lost seats.
His centre-right CiU remains the largest bloc, winning 50 seats out of 135, down from 62 last time.
The left-wing separatist ERC won 21 seats. But a BBC correspondent says despite their combined majority, the parties may be unable to work together.
Both the CiU and ERC want to hold a referendum on independence from Spain.
Mr Mas told the BBC he would consult the people on independence within the next four years.
"I am happy with tonight's results," he said, "but not as happy as I could have been."
Mr Mas called early elections after a funding row with the central government in Madrid.
It has accused him of trying to exploit the economic crisis, saying Catalan nationalists were looking for excuses after nearly running out of money.European membership?
Mr Mas says the wealthy and influential north-eastern region gets a raw funding deal from the central government. His centre-right Catalan nationalist coalition (CiU) argues a Catalan state would fare better as a member of the EU than a province of Spain.
The European flag was prominent at Mr Mas's campaign rallies, and he says an independent Catalonia would quickly gain membership of the 27-member bloc.
However, the Esquerra Republicana de Catalunya (ERC), the Republican Left party, has more than doubled its previous share of seats - up from 10 in 2010 to 21 this time.
That has been seen partly as a reaction to Mr Mas's resort to austerity measures to fight Catalonia's debt.
CiU and the ERC have very different views of how to address the economic crisis, says the BBC's Tom Burridge, in the Catalan regional capital Barcelona.
The result may actually mean a referendum on independence from Spain is therefore less likely, because the political process has become even more complicated, our correspondent says.
It was already far from straightforward, he says.
A referendum would be illegal under the current Spanish constitution, and Spain's ruling Popular Party is likely to block any attempts for constitutional change.
Other parties, such as the Ciutadans, the Popular Party of Catalonia and the Socialist Party of Catalonia are all opposed to Catalonia's independence bid.