BARCELONA, Spain — Catalan voters turned out in force Thursday for a regional election seen as a crucial test of strength for the powerful movement that wants Catalonia to secede from Spain.

The vote was called by the Spanish government in an attempt to end the political crisis that erupted in October over a banned referendum on independence.

Opinion polls before the vote had predicted a close race between the separatist and unionist parties, and the two sides were neck-and-neck after half of the ballots had been counted Thursday.

Voters were choosing between parties who want Catalonia to remain part of Spain and those who want to continue the push for turning the northeastern region into an independent republic.

Official results were expected late Thursday.

The election was held under highly unusual circumstances, with several pro-independence leaders either jailed or in exile for their roles in staging the Oct. 1 independence vote that was declared illegal by Spain’s highest court. Former Catalan President Carles Puigdemont campaigned from Belgium, where he is evading a Spanish arrest warrant in a rebellion and sedition probe.

“It’s not normal, an election that takes place with candidates in prison and candidates in exile,” Puigdemont said in the Belgian capital. In a tweet, he thanked an 18-year-old woman who cast a vote on his behalf in a town near Barcelona.

At the heart of the battle was the recent independence push that led to Spain’s worst political crisis in decades.