In a country of three million people and 40 million sheep, it is the ultimate nightmare: one day the sheep will rise up and turn on the humans.

A film tapping into these primal fears has become New Zealand's highest-earning horror movie. Now Black Sheep, about a genetic engineering experiment that goes badly wrong, is being exported. It will have its Australian première at the Sydney Film Festival this week and opens in London in August.

Replete with bad puns (Violence of the Lambs, Get the Flock out of Here!), Black Sheep demonstrates that New Zealanders - contrary to popular belief - can laugh at themselves. "The one thing the rest of the world associates New Zealand with is lots of sheep," said Jonathan King, the film's writer and director. "Most of us, in fact, have nothing to do with sheep. But whenever we travel, we get sheep jokes. With this film, we make the joke first."

The low-budget movie, which is being released in the US this month, features a main character, Henry Oldfield, who grew up on a farm. As a child, following his father's death, he developed a fear of sheep. With his ovinophobia still raging despite years of therapy, he returns to the farm to persuade his older brother, Angus, to buy him out.

There he finds Angus engaged in a reckless experiment, blending ovine DNA with that of humans. The sheep turn into psychotic killers that savage farmers and terrorise a rural town. The plot thickens when two environmental activists try to find out what the flock has been going on. Given that sheep have a woolly and harmless image, it sounds an unlikely scenario. King begs to differ.

"Most people see sheep from a distance, as little balls of cotton wool on a hillside," he said. "But if you get close to them, they're quite strange animals, with hard, bony heads, and beady, lizardy eyes, and sharp little hooves. And they're bigger than you think. If a sheep comes at you, or stops and stares at you, it's quite unnerving."

King, who grew up in the suburbs, was not inspired by personal trauma. "I was never mauled by a sheep as a child," he said. "But I once had a holiday on a farm, and I remember driving up the hillside at night and seeing all these sheep's eyes reflected in the headlights. It was scary."

He visited a number of farms while looking for a movie location. "The farmers liked the idea of killer sheep," he said. "They roared with laughter."

Black Sheep, which also features a sheep sex scene, is King's first feature film. Special effects were created by the same outfit, Weta Workshop, that worked on the Lord of the Rings trilogy.