VALENCIA, Spain (AP) – In a visit billed as a mini-showdown with Spain’s Socialist government, Pope Benedict XVI drove home the importance of the traditional family before hundreds of thousands of pilgrims Sunday, insisting that marriage must be between a man and woman.

During a 26-hour trip, the pope met with Socialist Prime Minister Jose Luis Rodriguez Zapatero, whose government has legalized gay marriage and introduced other liberal reforms that have irked the Vatican. Government officials described the talks as cordial and said no criticism was exchanged.

There was no comment from the Vatican.

At an open-air Mass before leaving for Rome, Benedict reiterated that the family was “founded on indissoluble marriage between a man and a woman.”

Spanish organizers estimated some 1.5 million people attended the Mass, while witnesses estimated the crowd at less than half that.

The Mass came at the end of a nine-day church gathering focusing on family issues. Benedict said the next family congress would be in Mexico City in 2009.

At Valencia airport, where Spain’s king and queen bade him farewell, Benedict said he was confident the family meeting in Spain would “help today’s world to understand that the marriage covenant, whereby man and woman establish a permanent bond, is a great good for all humanity.”

The German-born pope, wearing green vestments and a gold miter, said every family has its origin in God and that “at the origin of every human being there is not something haphazard or chance, but a loving plan of God.”

Many Catholics welcomed the pontiff’s words.

“It’s a very brave message when he says that just as in nature, natural matrimony is the union between man and woman,” said Fernando Perez, 59, of Valencia. “For me, the problem is not that society is becoming more secular but that people just don’t care about anything.”

Benedict also spoke of the importance of parents educating their children in traditional family matters.

Spain has passed from being a bedrock of Roman Catholicism to a predominantly lay society in less than a generation. Statistics show that while 80 percent of Spaniards still call themselves Catholics, only 42 percent believe in God and 20 percent go to Mass.

“These messages come as a great relief for Catholics,” said Carmen de Rosa, 49. “Spain reflects a world which strides toward laity. So we Christians must stand up for the testimony of Jesus Christ.”

Besides the religious ceremonies, the highlight of the trip was a 15-minute meeting Saturday with Zapatero and Deputy Prime Minister Maria Teresa Fernandez de la Vega, who oversees government-Vatican relations. Both were booed by a small number of local residents as they entered the building to meet Benedict.

Television footage of the meeting showed the three smiling and exchanging gifts. A government aide said the meeting was “extraordinarily cordial.”

In addition to gay marriage, Zapatero’s government has introduced fast-track divorce, medically assisted fertilization and halted a plan by a previous, conservative government to make religion classes mandatory in public schools.

Spain also permits abortion.

Many Spaniards have drifted away from the church in the three decades since the fall of the Gen. Francisco Franco dictatorship, under which it enjoyed special privileges.

Benedict returned to the Vatican on Sunday after the Mass.

Only subscribers are eligible to post comments. Please subscribe or to participate in the conversation. Here’s why.

Use the form below to reset your password. When you've submitted your account email, we will send an email with a reset code.