Pope Benedict XVI on Sunday called on Catholics to "be courageous" in defence of the traditional family as he celebrated open-air mass before hundreds of thousands of people in Zagreb.
The pontiff, on the second day of a visit to Croatia, warned couples cohabiting outside wedlock that living together was no substitute for marriage.
"Dear families be courageous! Do not give in to that secularised mentality which proposes living together as a preparation, or even a substitute for marriage!" he said in his homily during mass at a hippodrome outside the capital.
The head of the world's 1.1 billion Roman Catholics urged lawmakers to introduce legislation that "supports families in the task of giving birth to children and educating them."
The 84-year-old Benedict, who arrived at the packed hippodrome in his Popemobile slightly behind schedule for the mass, had to be helped up the stairs to the altar.
The Vatican said 400,000 pilgrims attended the mass celebrated in the same hippodrome used by his predecessor Pope John Paul II in 1994 while the Balkan wars were still raging with the frontline just 40 kilometers (25 miles) away. Croatian television put the figure at around 300,000.
Benedict kicked his off his visit on Saturday by highlighting Europe's Christian roots and Croatia's place in Europe, and he focused on family values during his homily.
"In today's society the presence of exemplary Christian families is more necessary and urgent than ever," he said, adding that they were called to give a "specific and irreplaceable contribution to evangelization".
"Unfortunately we are forced to acknowledge the spread of a secularisation which leads to the exclusion of God from life and the increasing disintegration of the family, especially in Europe," the pope said.
The conservative Croatian Catholic Church exerts heavy influence over the country sometimes called "the little Poland of the south".
Still even here in staunchly Catholic Croatia, as in other parts of Europe, the Church laments that young people ignore its teachings on family and sex.
"Freedom without commitment to the truth is made into an absolute. ... Love is reduced to sentimental emotion and to the gratification of instinctive impulses without a commitment to build lasting bonds of reciprocal belonging and without openness to life," the pope warned.
The homily was heard by pilgrims of all ages and from across Croatia, neighbouring Bosnia, and other central European countries. They carried flags and wore scarves in the Vatican's white and yellow colours. Some had already arrived before dawn for the mass, which started at around 10:00 am.
Karmen Serpic, 40, who attended the mass with her husband and their two youngest sons burst into tears of joy afterwards.
"There are no words to describe how I feel right now," she said.
Her husband Ivan told AFP he felt strenghthend by the pope's words.
"We heard what is needed in these difficult times and the pope came at the right moment.
Our way of life has changed and faith can help us to face all those challenges," he said.
Later on Sunday, Benedict XVI was to pray at the tomb of controversial Cardinal Alojzije Stepinac, whose "real humanism" he praised on the plane to Croatia.
Stepinac, who headed Croatia's Church during World War II, was put on the road to sainthood by John Paul II in 1998.
However, critics claim the cardinal failed to stand up against the persecution of Serbs and Jews by Croatia's pro-Nazi Ustasha regime.
After the war, communist Yugoslav authorities accused Stepinac of collaboration with the Ustasha government, which he denied, and sentenced him to 16 years in jail.
The pope was set to return to Rome late Sunday.