It was like something out of the movies. When a posse of Warner Brothers executives jetted in to New Zealand this week, the whole country was watching. The great Hobbit hullabaloo at last was coming to a head. And this was a task for no less a person than the prime minister. Could John Key persuade the studio bosses that any threat of thespian unrest had been extinguished, and so save the Peter Jackson double-feature for the nation, seeing off an almighty gazumping by some exotic alternative like Bucharest, or Dublin, or Watford? Too bloody right he could.

The prime minister came through. Like The Lord of the Rings before it The Hobbit films will be shot in New Zealand. And all it took to make the Warners people happy was famed Kiwi hospitality. That and new employment legislation. And an extra NZ$10m (£6m) in tax relief. And a NZ$13m top-up to the films' publicity budget. As one wit put it, if Roman Polanski wanted to make a film in New Zealand, the government would be more than happy to lower the age of consent to 13.

What had begun as a technical industrial disagreement turned quickly into a ripping yarn. When the New Zealand actors' union threatened to boycott the films, things spiralled into a debate that fixated and polarised the nation. The actors' demand, in a country where employee protections have steadily been legislated away over recent decades, was essentially reasonable: they wanted to be able to negotiate a collective deal. Much less reasonable was the bellicose way they went about it. Jackson pressed the alarm button – the studio was terrified by the scent of uprising, he said, and it was threatening to uproot the film.

Soon film crews were marching the streets of Wellington to demand the luvvies stop their grandstanding. The actors – and their sometimes shambolic union leaders – were effortlessly cast as greedy, as naive, as self-absorbed. And Jackson slammed his spotlight squarely on the villain: the "bully-boy" offshore actors' union that had merged with its wide-eyed New Zealand neighbour and was desperate to flex its muscle. That would be an Australian union. And we all know what Australians are like.

A chastened acting community quickly realised how horribly their efforts had backfired, dropped any threat and promised not to challenge their conditions. But the big people at the big studio were still wobbling, Jackson insisted – they needed more assurance than that. Much more, it turned out.

The settlement with Warners had plenty of watchers enraged. The nation had paid an "extortionate" price to placate the studio, said Thursday's New Zealand Herald. In making a statutory change that makes clear that contracted film workers are unable to claim full employment rights, argued one commentator, New Zealand had sacrificed its sovereignty, "sold its democratic soul for 30 pieces of silver". One blogger reckoned that the entire New Zealand film industry had been "enslaved".

To some the whole jaunt was cooked up by Warners to extract a better tax deal – a deal which has nothing to do with the question of employee status; certainly, when the industrial dispute surfaced they did all they could to lever such concessions. Possibly there was never any serious prospect of relocating the films.

But however bent-over-backwards John Key is left looking, he could hardly risk calling that bluff. The scale of the controversy in New Zealand was such that to lose the films would have been, with an election next year, a political disaster. It would have meant losing something like 1,000 jobs and an overall economic boost of about a billion dollars. It sets an uncomfortable precedent – any studio contemplating shooting a film in New Zealand will no doubt demand their own sweeteners – but had Warner pulled out, other studios would presumably be dissuaded from shooting in New Zealand at all.

It is probably daft to start drawing comparisons between The Hobbit and Wayne Rooney. So here goes: much as Alex Ferguson and Manchester United could not afford to let their Bilboesque, talismanic striker leave the football club, Key and New Zealand could not afford to let this production take flight. Not just because they're valuable things to have in themselves, but because to lose them would send a message that they're a much less serious proposition when it comes to securing the next hobbit that comes along.