MADRID (Reuters) - Spain’s prime minister said on Friday that the new Catalan parliament should hold its maiden session on Jan. 17, 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,” Prime Minister Mariano Rajoy said in an end-of-year address to the nation.

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

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

Both were fired by Rajoy after they declared independence following a banned Oct. 1 referendum on secession from Spain.

“The only shadow looming over our economy is the instability generated by the political situation in Catalonia,” said Rajoy, whose own center-right party performed miserably in the poll, in his speech from the prime minister’s palace in Madrid.

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.

Ciudadanos, 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 Puigdemont, who campaigned from Brussels.