The Vatican's top official for family issues has condemned the Spanish government's proposal to allow homosexuals to marry and to adopt children as a "sad step. This makes Spain the third country in Europe - after the Netherlands and Belgium - to recognise same-sex marriage although some other countries have provisions for recognising committed same-sex unions.
Under the new legislation, same-sex couples who marry will also receive a dead partner's pension and inheritances, and will be able to divorce and adopt children.
Some 14 articles of the civil code will be altered so that the words "man and woman" and "father and mother" are replaced by "partners" or "parents."
The Spanish justice minister Juan Lopez Aguilar told RNE state radio: "Our constitution guarantees the right to marriage.
"We're going to extend that right to people who historically have been discriminated against - homosexuals."
The move has met with strong opposition from the Roman Catholic Church, which warned that it risks "introducing a virus into society."
Speaking on national television, Juan Antonio Martinez Campo, a spokesman for the Spanish Bishops' Conference said that the decision would be tantamount to introducing "a counterfeit currency," with grave consequences for society.
The Prime Minister, Jose Luis Rodriguez Zapatero, also on television, retorted that the new marriage law was an overdue "extension of civil rights."
The government's plan to liberalise abortion laws, allow embryo research for therapeutic purposes, make divorce easier and crack down on domestic violence also faces the fury of the Catholic church and its followers.