Original: "God Defend New Zealand" was written as a poem in the 1870s by Irish-born, Victorian-raised immigrant Thomas Bracken of Dunedin, a freemason.
Simplified: The competition was to see who could compose the best music to fit the words.