He allegedly threatened to post the pictures to the web, then hacked her family computer, and then attacked the school.
At the same time, he uploaded the explicit images and videos of the girl to pornography websites and bombarded the school's Facebook page with links to them.
"This was a particularly distressing experience for the victim and her family," said Detective Senior Sergeant Cliff Clark of the New Zealand police cybercrime unit. "We are pleased for them that we have been able to work with the Danish authorities in making an arrest."
The principal of the school - which the Herald has chosen not to name - said he was "extremely relieved" that the ordeal was over. It had been a long, tough process for the girl, who had suffered in the extreme, he said.
The girl's relationship with the man began through online gaming. It progressed from sharing photos, to Skype calls, where the girl undressed in front of a camera, and then to the revenge after her family stepped in.
The man was apprehended in the city of Vejle in a joint operation involving the New Zealand and Southeast Jutland police and the Danish National Cyber Crime Centre.
His arrest follows a case this month when the FBI arrested a man in Florida for sending sexually explicit photos to a 9-year-old North Island girl on a social networking site.
Netsafe executive director Martin Cocker said both hacking and "sexploitation" were on the rise in NZ and parents needed to talk to their children about their online behaviour.
There were two aspects to the crime - one where predators befriended users, extorted images from them and then blackmailed them for more; and the cyber attack.
The specific type of attack was a distributed denial of service, where hackers shut down computers and systems by overwhelming them, which was becoming more common.
"The opportunity and tools that were available to this guy are available to pretty much everybody, and the threshold for becoming a cyber-criminal and cyber-nuisance is pretty low," Mr Cocker said.
"People who have a mindset to get into it, certainly there's nothing stopping them."
Mr Cocker said in this case, the man was vindictive and it was very difficult to stop him, hence the need for law enforcement staff, who he said did a "stellar job".
Patrick Walsh, head of the Online Safety Advisory Group, said clear guidelines for principals and parents could be accessed from the Ministry of Education's website.
"The rule is that there isn't to be any notion of online privacy between children and parents. You should have the right to access the Facebook page, the texts, and where they're going online."
The Danish man will be tried in Denmark.
Keeping kids safe online - tips from the experts
• Talk to your children. Parents should realise there needs to be no secrets with teenagers. It's dangerous.
- School Principal
• Make sure teenagers understand the importance of keeping details private. Not using their full names or revealing addresses or phone numbers are ways to keep safe.
- Kidspot
• If your child tells you about an issue reassure them they've done the right thing to trust you with the problem.
- Netsafe
• Negotiate clear guidelines for web and online game use that fits your kids' maturity and family's values. Pay attention to what kids do and who they meet online.
- Microsoft