Pope Benedict XVI has strongly defended the traditional family during a brief visit to the Spanish city of Valencia.
The government has introduced a number of reforms including gay marriage, but the Pope insisted there were some things the Church had to reject.
"The family is a unique institution in God's plan, and the church cannot fail to proclaim and promote its fundamental importance," he said.
He also prayed at the scene of a subway crash which killed 42 people on Monday.
The Pope met relatives of some of the underground crash victims
"We ask God's comfort for those who remain and those who left us," he said.
The crash, the worst on the underground in Spanish history, happened when the train entered a station at double its normal speed.
Later in the Pope's visit, around one million people are expected to attend an open-air mass being celebrated in a park on Sunday.
As he arrived for his 24-hour visit, the Pope was met at the airport by King Juan Carlos, Queen Sofia and Prime Minister Jose Luis Rodriguez Zapatero.
It is only his third trip abroad since his election 14 months ago.
It comes a year after the Spanish government legalised marriage between homosexuals, sparking a bitter dispute with Spain's Catholic bishops.
The Pope and Mr Zapatero will hold talks, but Spanish officials say Mr Zapatero will not attend Sunday's mass.