Pope Benedict XVI ended a brief visit to Valencia today with a mass which organisers say was attended by up to a million people.
He praised the traditional family which, he said, was founded on the indissoluble marriage between a man and a woman.
The Vatican has criticised the legalisation of gay marriage, as well as laws making divorce and fertility treatment easier.
The mass was attended by Spain's royal family, but not by the Prime Minister, Jose Luis Rodrigues Zapatero.
Pope Benedict arrived in Spain yesterday to attend the end of a conference on traditional Roman Catholic values.
In an address yesterday, he criticised what he described as the rapid secularisation of Spain.