CATALONIA’S election has been won by Pedro Sanchez’s Socialist Party.

The region’s pro-independence parties fell short of the required 68 seats combined to form a coalition government for the first time in more than a decade.

The Catalan Socialist Party (PSC), the Catalan wing of the Socialist Party led by Salvador Illa, made substantial gains to emerge as clear winners.

They secured 42 seats out of 135 in the Catalan parliament, with almost all votes counted.

The party, however, fell short of a majority and will need to seek a deal with others in the chamber to form a government.

READ MORE: John Swinney: I'll drive growth for the benefit of all in Scotland

The pro-independence Together for Catalonia party (JxCat) of Carles Puigdemont, the man who as Catalan president in 2017 attempted to declare independence from Spain, came in second with 35 seats, while the ERC – Republican Left - won 20.

Illa hailed the result as the start of “a new era” and told supporters on Sunday it was his intention to become Catalonia’s next president.

He said that among the factors which had secured the result "were the policies implemented by the Spanish government and its prime minister, Pedro Sánchez, to whom I send my acknowledgement and thanks".

The minority ERC government of Pere Aragonès called the snap election after failing to gather enough support to pass the region's annual budget.

Sánchez is likely to see this result as vindication of his policies in Catalonia - in particular, an amnesty law benefiting independence supporters who face legal action for activist activity.

The amnesty law was a condition of the parliamentary support that JxCat and ERC gave to Sánchez in his investiture, allowing him to form a new central government last November.

Puigdemont, who fled abroad in 2017 after leading a failed secession bid, is expected to benefit from the amnesty and return to Spain. He campaigned ahead of this election from the south of France.

Illa is likely to need the support of ERC and the far-left Comuns Sumar alliance to form a government.

Puigdemont called for ERC not to be part of a coalition that included the unionist PSC. Instead, he suggested the two main pro-independence parties should try to form an administration, as they had done in the past before their relationship broke down.

"If ERC is willing to rebuild bridges, so are we,” Puigdemont said.

If a new administration is not formed, there will be a repeat election.