Parliament passed an amendment to current labor law

New Zealand legislators have approved the government’s “Hobbit law,” aimed at assuring the tentpole project will be shot locally.

New Zealand’s parliament passed an amendment to existing labor law on a 66-50 vote Friday, following the settlement of a bitter one-month firefight with actors unions over a boycott that provoked Warner Bros. and director Peter Jackson to threaten to move “The Hobbit” to Europe or Australia.

The change in the law was part of a package hammered out earlier this week by prime minister John Key to persuade Warners to keep the two pics in New Zealand. The revision — dubbed The Employment Relations (Film Production Work) Amendment Bill — specifies that actors and other film production personnel hired as independent contractors can not subsequently claim to be employees, preventing the workers from claiming additional rights.

The legislation stems from a 2005 court case in which a former modelmaker at Peter Jackson’s Weta Workshop won the right to be considered an employee rather than a contractor.

Labour and Green Party members voted against the bill, asserting that it will create more litigation. They also accused the government of capitulating to a foreign company and abusing parliamentary process.

The seven actors unions had announced a boycott on Sept. 24 because producers had refused to sign a contract with the New Zealand Actors Equity, then called off the boycott a week ago and pledged that they wouldn’t disrupt “The Hobbit.”

Warners, New Line and MGM announced they were greenlighting the project on Oct. 15 with shooting starting in February, but didn’t give a location. Facing the prospect of a black eye to the film and tourism industries, Key agreed to provide additional tax rebates for Warner Bros. and work with the studio on a strategic partnership to promote New Zealand as a film production and tourism destination.

Jackson will direct both segments in addition to writing and exec producing. Pre-production on the films has been under way for many months in New Zealand.

Follow @Variety on Twitter for breaking news, reviews and more