UPDATE - The Civil Unions Bill has been passed by Parliament.
From April 26 next year couples can commit themselves to the new civil union.
Parliament voted 65-55 to pass the controversial legislation which has polarised opinion and split political parties.
During the last three days MPs opposed to it fought to change the Civil Union Bill and to force a referendum on it.
They failed, and today the majority on the third reading was the same as it has been through most of the legislative process.
The bill also applies to heterosexual couples, but it does not change the Marriage Act which still applies only to men and women.
After MPs cast their conscience votes and the final count was announced, the debating chamber was drowned in applause from the public galleries.
MPs embraced, cheered and congratulated each other while Destiny Church leader Brian Tamaki and his followers glowered down.
Outside Parliament rival rallies attracted about 400 people, with opponents slightly outnumbering supporters.
While the bill's backers played music and threw orange balloons, opponents stood in silent protest.
Conservation Minister Chris Carter, who is planning a civil union with his partner Peter Kaiser as soon as the law is implemented, told Parliament history was being created.
"Today I sense tremendous joy and enthusiasm," he said during the third reading debate.
"We will have an opportunity we have always been denied."
The minister in charge of the bill, David Benson-Pope, said the legislation took nothing away from marriage.
"Once this bill is passed, and the sky doesn't fall in, the opposition to it will very quickly evaporate," he said.
"It gives the simplest of things -- the formal recognition and respect by our laws for the individual choices of New Zealanders."