The New Zealand Parliament has given strong support to a bill which would make same-sex marriage legal.

The Marriage Amendment Bill has passed its first reading in parliament, 80 votes to 40.

Both the Prime Minister John Key and the Opposition Labour leader, David Shearer, backed the legislation, and MPs were free to vote according to their conscience, rather than along party lines.

Mr Key, who is in Cook Islands for the Pacific Islands Forum, says he is stunned and excited by the support.

"It was an overwhelming result and I think it puts the bill in a pretty strong place to potentially become law, given you've had two-thirds of parliament voting for it," he said.

"I think New Zealand's always been a country that's really stood up for equality of rights and egalitarian society, being the first country to give women the vote."

The bill will now go to a select committee, and will have to pass another two votes before becoming law.

The Labour politician behind the bill, Louisa Wall, had been hoping for 61 votes.

She said the much stronger support garnered made for an historic moment in the move towards equality in marriage for all New Zealanders.