Clearing the way for a law that has sparked protests from conservatives and religious groups, France's Senate approved the crucial first article of a bill granting gay couples the right to marry.
The upper house approved the article overnight by a vote of 179 to 157, with all Senators from the ruling Socialists voting in favour and five from the main opposition right-wing UMP breaking ranks with their colleagues to approve it.
The full bill must still be approved by the Senate, as well as another controversial article granting homosexual couples the right to adopt. A final vote is expected on Thursday or Friday.
The vote came after 10 hours of debate that saw UMP Senators voice fierce opposition to the bill.
"Marriage is between a man and a woman with a view to procreation. Two men or two women will never be able to have children!" UMP Senator Charles Revet said during the debate.
The bill has come under vehement attack in a country that is officially secular but predominantly Catholic, mobilising hundreds of thousands of people in pro- and anti-gay marriage protests nationwide.
In January, hundreds of thousands of demonstrators flooded into Paris for an anti-gay marriage march. Last month, police were forced to fire tear gas on people protesting the bill, and dozens were arrested.
Opponents said Wednesday they would organise another mass protest in Paris on May 26 if the law is approved, to demand its withdrawal and a referendum on gay marriage.
President Francois Hollande championed same-sex marriage and adoption during his election campaign last year, and his support for the legislation has not wavered throughout the turmoil.