Parliament yesterday banned party-hopping by MPs during the term of a Parliament, amid debate that opened up old wounds between Winston Peters and Jenny Shipley over past defections.

The law will remain in place for only two terms, "until MMP is bedded in", said Attorney-General Margaret Wilson.

It gives a party leader the right to force the resignation of an MP from Parliament if he or she reasonably believes the MP "has acted in a way that has distorted and is likely to continue to distort the proportionality of political party representation in Parliament".

The leader need only write to the Speaker giving notice and confirming that two thirds of the caucus agrees with the action.

The new law will affect constituency MPs and list MPs alike.

In the case of a constituency MP, a by-election would be held.

In the case of a list MP, the next person on the party list would be elevated.

Margaret Wilson said the Electoral (Integrity) Amendment Bill would enhance public confidence in the integrity of the electoral system.

It was passed 64 votes to 54.

The anti-party hopping measure was promised by Labour last election and was supported by the Alliance and New Zealand First.

Party hopping is most closely associated with New Zealand First, which lost nine MPs in 1998 during the first term of MMP when its leader, Mr Peters, was sacked as Treasurer and Deputy Prime Minister by Mrs Shipley, the then Prime Minister and leader of the coalition partner, National.

But most parties lost defecting MPs in the build-up to MMP. During the 1990s, 24 MPs changed parties mid-term.

National, the Greens, Act and Future United opposed the bill as an undemocratic move that gave party leaders draconian powers over freedom of individual MPs.

They said that party hoppers were dealt with by electors.

Mrs Shipley and Mr Peters sparred in debate.

Mr Peters accused her of using "preferment" to lure MPs from New Zealand First.

"What gives National the right to go out and offer people positions, preferment, and the baubles of office to break with the public will? There is a word for it but I cannot use it."

Mrs Shipley said the law was "rubbishy".

New Zealand First had "wangled" the bill out of the Labour-Alliance Government "so they can be the tail wagging the dog".

"If the Greens bail, they've offered to be a substitute tail for the dog. It's a disgraceful position to take in New Zealand politics.

"That's where fleas congregate, on the tail of a dog."

She spoke of the dispute that preceded Mr Peters' sacking, when he walked out of a cabinet meeting discussing the sale of Wellington airport.

"We know Winston Peters flounced off to his office and thought I'd call him and say 'come on honey, come back'.

"I was prepared to go to the country and I was as surprised as anybody else that we finished up with 62 members supporting the Government of the day."

National list MP Marie Hasler said the legislation was "an invitation to personal and political corruption".

"What kind of leader needs to have his or her political authority strengthened by special statute?"

Opposing the bill, Green co-leader Rod Donald quoted a press release of Mr Peters' on March 6, 1996, the day former National MP Michael Laws joined NZ First.

"New members of Parliament joining New Zealand First or any other political party without resigning and seeking a new mandate is consistent with constitutional precedent," Mr Peters' had said.

"MPs have to be free to follow their conscience. They were elected to represent their constituents, not swear an oath of blind allegiance to a political party.

"If an MP feels that membership in another elected party better serves his or her constituents, then that can be put to the test at election time."

Outspoken Mana Motuhake leader Willie Jackson, who has been seen as a potential breakaway from the Alliance, supported the bill, after initial reservations.

"We have assurances we will still be able to articulate a strong Maori view without being singled out."

The law takes effect as soon as it has been signed by the Governor-General.

10-year roll call of wandering MPs

Hamish MacIntyre - National to Liberals, 1991.

Gilbert Myles - National to Liberals, 1991; to NZ First, 1993.

Cam Campion - National to independent, 1993.

Peter Dunne - Labour to Future NZ, 1994; to United, 1995.

Clive Matthewson - Labour to United, 1995.

Margaret Austin - Labour to United, 1995.

Bruce Cliffe - National to United, 1995.

Pauline Gardiner - National to United, 1995.

Peter Hilt - National to United, 1995.

John Robertson - National to United, 1995.

Ross Meurant - National to Right of Centre, 1994.

Trevor Rogers - National to Right of Centre, 1995.

Michael Laws - National to NZ First, 1996.

Peter McCardle - National to NZ First, 1996; to independent, 1998.

Jack Elder - Labour to NZ First, 1996; to independent, 1998.

Alamein Kopu - Alliance to Mana Wahine, 1997.

Frank Grover - Alliance to Christian Heritage, 1999.

Neil Kirton - NZ First to independent, 1997.

Tau Henare - NZ First to independent, 1998.

Tuariki Delamere - NZ First to independent, 1998.

Tukoroirangi Morgan - NZ First to independent, 1998.

Rana Waitai - NZ First to independent, 1998.

Deborah Morris - NZ First to independent, 1998.

Anne Batten - NZ First to independent, 1998.

* Alliance leader Jim Anderton left Labour in 1989 and formed NewLabour. He stayed in Parliament and was re-elected to Sydenham (now Wigram) as a NewLabour MP in 1990. Formed Alliance coalition of parties in 1991.

* New Zealand First leader Winston Peters was expelled from the National caucus in October 1992. He resigned from Parliament in March 1993 and won a byelection in his Tauranga electorate. He formed NZ First in July 1993.

* The Green Party joined Alliance in 1991. Two MPs elected in 1996 under Alliance banner, Rod Donald and Jeanette Fitzsimons. Party voted in 1997 to leave the Alliance and contest the 1999 election as Greens. The two MPs remained Alliance MPs until the election.