Catalans are set to vote on whether or not they want to be independent from Spain in a referendum.
The decree was signed by Catalonia's president Carles Puigdemont and the rest of his cabinet in a bid to show a united front in the face of threats of legal action by Madrid.
Catalonia's regional government approved on Wednesday a law to hold an independence referendum, setting up a clash with the Spanish government that has vowed to stop what it says would be an illegal vote.
After 12 hours of often chaotic debate in the Barcelona parliament, a majority voted for the referendum and the legal framework to set up a new state, under which the assembly would declare independence within 48 hours of a 'yes' vote on October 1.
Politicians who opposed independence abandoned the chamber before the vote, with some leaving Catalan flags in their empty seats.
The winners, led by Mr Puigdemont, sang the Catalan national anthem once the votes were counted.
"We call on the citizens of our country to decide how they feel it is necessary to orient the future of Catalonia, whether by the current path of autonomy and trimmed statute or by a new road as an independent state in the form of a republic," Mr Puigdemont said after signing the measure into law.
Spain's government has asked the country's constitutional court to declare the referendum law void.
The government has labelled the move as a "constitutional and democratic atrocity" with deputy prime minister Soraya Sáenz de Santamaría saying it was a "shameful and embarrassing" betrayal, according to .
Seventy-two MPs voted through the legislation while 52 opposed the move.
"The government will defend freedom, democracy and coexistence," Ms Sáenz de Santamaría said.
"We won’t allow the law to go unheeded in Spain. Let no one doubt that we know what we have to do and that we will do it."
The Spanish constitution states the country is indivisible.