Catalan nationalist parties have signed a road map to secede from Spain in 2017 if independence movements win a September regional vote.

The election will “serve as a legal mechanism to determine the Catalan people’s will”, two main Catalan nationalist parties said in an agreement published Monday.

Nationalist leaders in the wealthy region of Spain have called the snap regional vote for September 27 after Madrid blocked their bid for a referendum on independence. It will be the third regional election in Catalonia since 2010.

The September vote will act as a “plebiscite”, Esquerra Republicana, Convergencia Democratica de Catalunya and several associations said.

>>Read: Catalonia takes election gamble to keep independence drive alive

If pro-independence candidates win the vote, they will create a new constitution and establish institutions that would form the basis of a future state, the road map plan pledged.

“The national transition process towards the declaration of a new Catalan state or republic will begin after the September 27 vote, and culminate at the most after 18 months,” the text said.

The plan also calls for “an obligatory referendum on the text of the constitution”, followed by a parliamentary vote and negotiations to determine Catalonia’s “new relationship” with Spain and the European Union.

EU officials have warned that secession would cause Catalonia to leave the bloc. Despite holding massive demonstrations in Barcelona, separatists do not form a majority in Catalonia, which is home to around 7.5 million people, according to most polls.

>>Read: Catalonia calls regional election step towards independence

During a symbolic independence referendum held in November last year, that the top court in Spain ruled unconstitutional, only 1.9 million out of 6.3 million potential voters cast their ballot in favour of secession.

Pro-independence feeling has surged in Catalonia in recent years, fanned by disagreements with the conservative central government and Spain’s sharp economic downturn, which has left nearly one in four people out of work.