However the Citizens party, which wants Catalonia to remain a semi-autonomous part of Spain, is the biggest party. As a result, it is unclear who will be given the right to form a government. The Madrid government stripped Catalonia of its autonomy and called the election after declaring an October independence referendum illegal. With nearly all votes counted, the pro-independence parties Together for Catalonia (JxCat), Republican Left of Catalonia (ERC) and Popular Unity (CUP) were together on course to win a total of 70 seats, giving them a majority.
Pro-independence parties have retained their majority
Within the separatist party block, ousted Catalan President Carles Puigdemont's JxCat was slightly ahead of the ERC, led by his former deputy, Oriol Junqueras. Speaking in Brussels, where he is in self-imposed exile, Mr Puigdemont said the "Catalan republic" had won and "the Spanish state has been defeated". The situation called for "rectification, reparation and restitution," he said. He is accused by Spanish prosecutors of rebellion and sedition. Mr Junqueras faces the same charges and is currently in prison.
Ms Arrimadas said she would try to form a coalition
Citizens (Cs) had 25% of the vote, winning 37 seats in the 135-seat chamber. Its leader Inés Arrimadas told the BBC her party had been "victorious". She said forming a coalition would be "difficult - but we will try". The Popular Party (PP) of Prime Minister Mariano Rajoy, who took the decision to remove Catalonia's autonomy, was projected to win just three seats in the new Catalan parliament, down from 11 in the 2015 election. Election turnout was more than 80%, a record for a Catalan regional election.
Why did the election take place?
Separatists who dominated the previous Catalan parliament declared independence on 27 October, after the referendum which was declared illegal by Spain. In an attempt to stop that referendum, Spanish police stormed some polling stations. However many voters defied the Spanish courts and riot police to cast their ballots. The move led to violent clashes with hundreds of people reported injured. Footage showing police tackling people at polling stations. According to the organisers, 90% of voters were in favour of independence, but fewer than half the region's electorate took part. Mr Puigdemont decided it was enough to declare independence from Spain.
MORE