Mr Silva said if he vetoed the bill, parliament would overturn his decision

Portugal's President Anibal Cavaco Silva says he will sign a law legalising same-sex marriage passed by parliament earlier this year.

The law had been fiercely opposed by conservatives in the Catholic country.

The ratification will make Portugal the sixth country in Europe to allow same-sex marriage after Belgium, Spain, Norway, the Netherlands and Sweden.

The announcement comes days after Pope Benedict, on a visit to Portugal, told pilgrims they should oppose the law.

Portugal's Constitutional Court validated the bill last month.

Economic focus

In a televised address, Mr Silva said he regretted that political parties had failed to reach a compromise on the issue.

He said vetoing the bill would merely return it to parliament where his decision would be overturned, at a time when MPs needed to focus on the economic crisis facing the country.

"I feel I should not contribute to a pointless extension of this debate, which would only serve to deepen the divisions," he said.

The bill had received parliamentary approval with the support of the governing Socialist Party and other parties further to the left.

During a heated debate in January, Prime Minister Jose Socrates said the law would put right an injustice that caused unnecessary pain.

But parliament rejected proposals to allow homosexual couples to adopt.

Many other countries have introduced civil partnerships, which give lesbian and gay couples some of the rights of married heterosexuals.