The proposal would create 40,000 jobs in the country and provide some much needed funds for the state, said the Catalan left-wing, republican ERC party of its pro-hashish stance.
The party, which also had the backing of the United Left, said the move would mean €400 million for Spain in social security and tax funds, reported news agency Europa Press.
Catalan politician Alfredo Bosch had introduced the motion in the wake of a parliamentary debate with Spain's justice minister Alberto Ruiz-Gallardón in which the minister again highlighted international studies showing smoking cannabis was harmful to health .
For Tuesday night's vote, however, it was ERC politician Joan Tardà who took the mike.
He pointed out the double standard which allowed politicians to admit they got drunk from time to time but not to say they smoked joints.
But Joaquín Villanova, a deputy for the ruling Popular Party (PP) said people would start smoking cannabis at a younger age if the drug was legalized.
The move would also send a message of tolerance in terms of drugs, the PP politician said.
When the vote was held, the full spectrum of political parties from the PP to the socialist opposition PSOE and the Union for Progress and Democracy all snubbed the ERC proposal.
Spain is already looking at depenalizing the consumption of cannabis in line with Global Commission on Drug Policy, which is headed up by ex UN secretary-general Kofi Annan among others.
The ex-prime minister of Spain Felipe González has made a similar proposal about cannabis consumption in the past, reported El Confidential.