A White House national security aide, with access to the country's foremost policy makers and closely guarded secrets, blew it all for the chance to write racy, inflammatory and mean-spirited messages on Twitter.
Jofi Joseph, a director in the non-proliferation section of the National Security Staff at the White House, was fired after it was revealed that he was anonymously taunting senior administration officials, mocking politicians from both parties, and criticizing the policies he was helping to develop.
Under the handle @natsecwonk, he also revealed internal government information.
In short, he was a troll.
Trolls are anonymous Internet users who intentionally provoke others by writing inflammatory posts. They can be found in the comments sections of sites like YouTube and congregating in the darker corners of the Internet, on sites like 4chan.com.
"I'm a fan of Obama, but his continuing reliance and dependence upon a vacuous cipher like Valerie Jarrett concerns me," Joseph once tweeted, referring to the president's senior advisor.
He wondered if Huma Abedin, former aide to Hillary Clinton and wife of scandal-plagued Anthony Weiner, "was wearing beer goggles when she met Anthony Weiner," and called Sarah Palin and her family "white trash." White House sources said officials there spent months wondering who was behind the handle, before Joseph was unmasked and fired.
But why write spiteful things online if there are real-life consequences? What motivates trolls like Joseph?
Lack of inhibition resulting from anonymity online is a phenomenon psychologists call the Gyges affect, after a Greek myth about a shepherd who possessed a ring that could make him invisible.
"Cyber-psychologists often talk about the disinhibition affect. People do and say things online that they wouldn't do in real life," said John Suler, a cyber-psychologist at Rider University in New Jersey. In cyberspace, the face-to-face cues people rely on to curb inappropriate behavior is missing.
"People can't see you. You can't see them. You can't see if people are cringing or looking uncomfortable, and so trolls continue to say things they would never say in a room full of people, Suler told ABCNews.com.
But anonymity alone does not breed trolls, said Claire Hardaker, a professor at Lancaster University in England who studies Internet troublemakers. Trolls often have some sort of personal grudge, she said.
"Motivations seem to be as varied as the individuals who are found to troll -- they can be trivial, for example, boredom, psychological, e.g. emotional/social issues, political, e.g. the righting of (perceived) wrongs, personal, e.g. grudges against exes," Hardaker said in an email.
"If the behavior goes 'unpunished' each time, it can readily escalate into more and more serious abuse so that the individual may not even themselves realize that they've gone from being mildly offensive to actually engaging in potentially criminal activity," she said.
That's what happened with Joseph, who was fired from his job at the White House, and later issued an apology.
"What started out as an intended parody account of DC culture developed over time into a series of inappropriate and mean-spirited comments. I bear complete responsibility for this affair and I sincerely apologize to everyone I insulted," Joseph said in a statement.
Several other trolls have been revealed with real-life consequences. The real identity of a reddit.com user who went by the handle Violentacrez was exposed by a reporter last year. Violentacrez often posted online graphic and disturbing images of children just to get a rise out of people. Once his real name was posted online, the man lost his job at a Texas financial services company.