(CNN) -- A University of Georgia professor shot and killed his wife and two other adults in Athens, Georgia, in late April, according to police. A U.S. soldier fired on fellow troops in early May at a counseling center at a base outside Baghdad, Iraq, killing five comrades, according to authorities.

After fantasizing about killing, a person may begin planning an attack and obtain weapons, experts say.

While the full stories behind these particular shootings remain unknown, psychiatrists do have some sense of why some people "snap" and become violent.

In fact, although a person's snap into violence may come as a total surprise, in most cases there is a psychological buildup to that point, said Dr. Peter Ash, director of the Psychiatry and Law Service at Emory University in Atlanta, Georgia.

"There's a pathway to violence that starts with some thinking and then fantasizing about a plan," he said. "There may be a more explicit planning phase that other people don't particularly notice."

The fantasy of killing others may turn into intention, leading the person to track victims and obtain weapons, Ash said.

The psychological buildup to a violent outburst with the intent to kill usually takes a minimum of a few days, said Dr. Lyle Rossiter, a forensic psychiatrist in Saint Charles, Illinois. However, in highly unusual cases, a person with bipolar disorder could experience a buildup of only hours, he said.

A person who has already decided to kill someone else may develop an "eerie composure," firmly believing that the moment to turn back has passed, said Dr. Charles Raison, a psychiatrist and director of the Mind/Body Institute at Emory University.

Despite the planning during the buildup, experts have found that a perpetrator often cannot recall particulars about the moment of the attack. "You would think they would give it a lot of thought, but sometimes they go into a somewhat dissociated state where their feelings are really kind of split off from what they're doing," Ash said. "They may even experience it as if they went on autopilot."

Don't Miss

There are clear risk factors to snapping, psychiatrists say. These include brain tumors, seizures, alcohol and drug abuse, and psychosis stemming from schizophrenia or other disorders.

Another risk factor is a condition called delusional disorder -- and in particular the "persecutory type" -- that causes people to believe that someone is plotting against them, Rossiter said. People with psychotic depression and schizophrenia may also develop such delusions, he said.

Although none of these risk factors is a certain predictor of snapping, there are associated warning signs, Raison said. If a person becomes unusually paranoid or suspicious, believes someone is out to get him or her, or says God told him or her to kill someone, these all indicate that the person may do something to harm someone else. They may stop bathing, become extremely agitated, and "go from 0 to 60 in a second," he said.

If delusions can contribute to violent behavior, what about flashbacks? Experts say people who suffer post-traumatic stress disorder are unlikely to act violently while experiencing a flashback. The range of emotions that a PTSD patient feels during a flashback -- fear, anxiety, dread, a sense of shock -- usually does not lead to a violent action, Rossiter said. The association between mental illness and snapping is controversial, some say. Most people with mental illness are not violent, said Dr. Roland Segal, a forensic psychiatrist in Phoenix, Arizona.

Life experiences can also contribute to snapping. When mental health professionals evaluate perpetrators of violent crimes, they look at relevant defining events and personality traits, he said. For example, the person may have experienced or witnessed violence or abuse early in life, Segal said.

Studies have shown that brain injury increases the risk of violent and aggressive behavior. Damage or abnormalities in the frontal lobe -- a brain area that regulates movement, inhibition, emotions and general behaviors -- has been linked to violent behavior. A 2007 study from the American Journal of Psychiatry found an association between violence and cortical thinning in some areas of the frontal lobe.

Health Library

Damage to the brain's temporal lobe, which contains structures involved in fear response, has also been suggested to have a connection to violence. "If a person has damage to the frontal or the temporal lobe, perhaps they cannot identify or evaluate the fear appropriately, and perhaps their response is of a more physical nature," Segal said.

Other warning signs include feelings of being hopeless, ashamed and trapped, Raison said. People with these feelings may announce ahead of time that they are going to kill someone else or themselves, which increases the likelihood that they will follow through with violence.

When people who are not psychotic are committing a homicide, some dehumanize or blind themselves to the person they're shooting, Ash said.

"It's striking when you talk to people who have done things like this, how they're really preoccupied with their own feeling and have in their mind stopped thinking of the other person as real full human being," he said.

If the warning signs are strong, the person should be taken to a hospital's emergency room, Raison said. Most ERs have the capacity to determine if someone is a danger to himself or others. In California, residents can call police to have someone evaluated, and then hospitalized if needed.

"You can't hold people forever, but this is the best thing society has at this point," Raison said.

Even 48 to 72 hours of treatment for psychosis reduces the risk of violence if a person has "just blown a fuse," he said.

Why some people snap and others don't is still a mystery, experts say.

"It's not possible to say that if you have A and you add B, and then C, that's going to equal violence," Segal said.