The FBI has launched an investigation after newly crowned Miss Teen USA Cassidy Wolf claims she was ordered to perform sexual favours by a hacker who took control of her webcam and threatened to post naked pictures he had taken of her online.

Wolf, 19, told the Today programme: "You would never think somebody would be watching you in your room and this guy had been. The thought of that just gave me nightmares."

She said that she first realised that something was wrong when her computer began acting strangely, with Facebook sending her a message warning her that someone had tried to access her account from another state, and her Instagram and Twitter accounts slowing down.

She then received an anonymous email, in which the sender demanded she 'perform' for him. He had attached nude pictures he had taken of her unknowingly using her webcam, and said that he would post them online unless she complied.

"I was terrified," she said. "I started screaming, bawling my eyes out. I was on the phone with my mom, and I felt helpless because I wasn't sure what to do."

The incident took place four months before she was crowned Miss Teen America,

"It happened to me when I was a normal girl and it can happen to anybody," she said. "The message is to tell somebody. The longer it goes on, the worse it will get, so if you can get the word out, talk to the authorities, it will already help you."

Cassidy now tours schools to warn other teenagers of the dangers of cyber extortion and what they can do to stay safe.

"I had the same password for years," she said. "But now seeing that someone can hack into my stuff just by downloading an incorrect link, it's very important to change your passwords, delete your cookies."

She said that other steps that can be taken to protect privacy include regularly deleting web browser history, and even placing a piece of tape across the webcam to block it when it is not being used, as it can be activated by a hacker even when a computer is in 'sleep' mode.

Earlier this year, UK student Rachel Hyndman, 20, said that she noticed that her webcam had turned itself on when she was watching a DVD on her laptop in the bath, and realised that she was being watched.

"I was sitting in the bath, trying to relax, and suddenly someone potentially has access to me in this incredibly private moment and it's horrifying," she told the BBC.

Hackers are able to access victims' computers and take control of their webcams through malicious software (malware) called a remote-access Trojan (RAT).

These are spread through infected files the victim unknowingly downloads or through being tricked into visiting websites.

People whose computers have been hacked are branded "slaves" and a BBC investigation uncovered a websites where hackers exchange picture and videos of 'ugly' slaves and female slaves.

The chief executive of the government's Get Safe Online campaign, Tony Neate, says: "The most at-risk computers are those running older software which has not been updated, and those without up-to-date anti-virus software installed, making it even more crucial that people ensure their computer has the latesdt version of security software installed across all devices."