The Portuguese parliament has approved a law allowing homosexuals to marry.
The bill was approved with the support of the governing Socialist Party and other parties further to the left.
The law has been fiercely opposed by conservatives. A petition seeking a national referendum on the issue collected more than 90,000 signatures, but the proposal was rejected.
The BBC reports the bill will now be reviewed in committee before a final vote is held in parliament.
If the law is ratified by President Anibal Cavaco Silva, it could come into effect in April - a month before a visit to Portugal by Pope Benedict XVI, a staunch opponent of gay marriage.
The ratification would make Portugal the sixth country in Europe to allow same-sex marriages. Others are: Belgium, the Netherlands, Norway, Spain and Sweden.