Pope Benedict XVI has called laws ignoring the difference between the sexes an "attack" on creation just days after Portugal moved to legalise gay marriage.

Creatures, including humans, "can be protected or endangered", the Pope, 82, told the Vatican diplomatic corps in a traditional January address focusing mainly on environmental issues.

"One such attack comes from laws or proposals which, in the name of fighting discrimination, strike at the biological basis of the difference between the sexes," he said, citing "certain countries in Europe or North and South America".

Portugal's parliament last Friday approved plans to legalise gay marriage, and a final vote could occur before a visit by the pope in May.

Also last week, two men became the first homosexual couple to legally marry in Latin America, in the southern Argentine province of Ushuaia.

"Freedom cannot be absolute," the pontiff said.

"For man, the path to be taken cannot be determined by caprice or willfulness, but must rather correspond to the structure willed by the Creator," he said.

AFP