France's National Assembly has approved a bill to legalise gay marriage and allow same-sex couples to adopt children.

After 10 days of debate inside and outside the parliament, the bill was passed with 329-229 with 10 abstentions - a much closer margin than the 400-175 recorded at the vote in Westminster on 5 February.

"This law is going to extend to all families the protections guaranteed by the institution of marriage," Prime Minister Jean-Marc Ayrault said before the vote.

"Contrary to what those against it say this law is going to strengthen the institution of marriage."

The "marriage for all" bill had been strongly supported by President Francois Hollande and the left but was vehemently opposed by conservatives in the lower house.

Mass protests and counter-protests hit French streets ahead of the vote.

According to polls, most citizens support same-sex marriage but were colder towards proposals allowing homosexual couples to adopt.

"This law is a first necessary step, a social evolution that benefits society overall," said Socialist representative Corinne Narassiguin.

"Opening up marriage and adoption to homosexual couples is a very beautiful advance. It is an emblematic vote, a vote that will mark history."

To pass into law, the bill has to be approved also by the French Senate. It goes to the upper house in April.

Of senators vote in favour, France will join another 11 countries, including Britain, the Netherlands, Belgium, Norway, Spain, Argentina, Canada and South Africa that have authorised gay marriage.