BARCELONA — After Catalonia declared independence two months ago, Prime Minister Mariano Rajoy of Spain took extraordinary control of the region and called elections, gambling that voters would punish the separatists who had propelled the nation’s worst constitutional crisis in decades.

That election now comes Thursday, but far from solving the conflict, it could just as easily complicate the task of governing the first of Spain’s 19 regions to have its autonomy stripped, placing the country in uncharted political terrain.

While Catalonia’s volatile politics have made predictions treacherous, polls indicate a potentially fractured result that may prolong the deadlock over the prosperous northeastern region’s status, even if it denies the separatists a victory.

Short of a surprisingly crushing victory by the unionists, any other outcome is unlikely to extinguish generations-old secessionist feelings that reached a boiling point this year in a region with a distinct language and culture.