Spanish Prime Minister Mariano Rajoy has said the new Catalan parliament should hold its maiden session on 17 January, the first step in reinstating local government after Madrid fired the old regional administration for illegally declaring independence.

Once the parliament is formed, potential leaders of the regional government will put themselves forward for a vote of confidence, although it could take months for a new government to emerge.

"I hope that as soon as possible we will be able to have a Catalan government that is open to dialogue and able to relate to all Catalans, not just half of them," Mr Rajoy said in an end-of-year address to the nation.

His comments follow the 21 December regional election that he hoped would quash the Catalan independence movement and so help resolve Spain's worst political crisis in decades.

Parties favouring a split with Spain instead gained a slim majority, but they may struggle to form a government, as one leader, Carles Puigdemont, is in self-imposed exile in Brussels, while Oriol Junqueras is in custody in Madrid.

Both were fired by Mr Rajoy after they declared independence following a banned referendum on secession from Spain at the beginning of October.

"The only shadow looming over our economy is the instability generated by the political situation in Catalonia," said Mr Rajoy, whose own centre-right party performed miserably in the poll.

The political instability in Catalonia, which accounts for a fifth of Spain's economy, has deterred tourists and prompted more than 3,000 companies, including the region's two biggest banks, to move their legal headquarters elsewhere in Spain.

The Ciudadanos party, which wants Catalonia to remain part of Spain and is led by Ines Arrimadas, gained the largest share of the popular vote, but unionist parties did not win enough seats to govern by majority.

The result instead raises the question of a return to power for Mr Puigdemont, who campaigned from Brussels.