Feelings of hopelessness and desperation. Fear of going to prison. Rage at life’s injustices.

These are just a few of the reasons often cited for people unraveling, holing up in a home or business and holding police at bay, usually for hours on end.

It’s a scenario area law enforcement agencies train and prepare for. And it’s one they are called on to deal with on a fairly regular basis around the Lowcountry.

In the past three years, area police have handled at least 19 standoffs with armed, threatening or despondent individuals.

Many of the encounters have dragged on for three hours or more, tying up law enforcement resources and keeping neighborhoods on edge. (The local record may be a 2002 standoff on James Island that lasted three days.)

“Our goal when we start out is for it to end peacefully and that everybody involved gets out safe,” said Lt. Anita Craven, commander of the Charleston police crisis negotiation unit. “That is our number one, foremost priority.”

The majority of the standoffs in recent years have ended with a peaceful outcome, usually with an individual’s surrender, followed by an arrest or committal to a psychiatric facility.

But the high stakes involved in such encounters were illustrated Tuesday when Mount Pleasant police shot and killed a 60-year-old man who pointed a gun at officers following a three-hour standoff in the Parish Place neighborhood.

That type of ending is what police spend hours training to avoid.

North Charleston police Capt. Joe Stephens said his department’s negotiators undergo at least 40 hours of instruction to get on the team, and they continually train to keep their skills fresh.

Every call is different, and they need to stay calm and patient while trying to resolve the situation in a way that no one gets hurt, he said.

“Basically it comes down to this — the suspect dictates our response,” he said. “He or she is responsible for how we react. If they are talking, then we are talking. When we break talks is when someone threatens the safety of our officers or civilians. ... But if we can start talking to them, that works most of the time.”

Most recently, on Sept. 10, his team spent more than an hour coaxing a despondent man, whom authorities feared would harm himself, from his mobile home on Remount Road. He eventually came out, and was taken to a hospital for a mental health evaluation, police said.

Charleston forensic psychologist Bart Saylor said a person who has reached such a nadir is often overwhelmed by his circumstances or has suffered great loss, rejection or a raw deal that has knocked their self-esteem for a loop.

“They’ve ruminated on it and worked themselves up to the point where there is no exit strategy,” he said.

Like many area agencies, Charleston police negotiators work closely with professional mental health workers to help them deal with such folks. They also train four times each year with the department’s SWAT team and bomb squad, running through true-to-life scenarios in which each unit is called upon to use its special skills to avert bloodshed and tragedy.

But that’s not always possible.

In October of last year, North Charleston police said they were forced to shoot and kill a 63-year-old man on Salamander Creek Drive after he fired shots at three people and threatened an officer with a gun.

In April 2001, a Charleston County Sheriff’s Office sharpshooter shot and killed a Goose Creek man after an eight-hour standoff in which he held his baby hostage and threatened to blow up his home with a keg of black powder.

For negotiators, finding out what’s behind a standoff and triggering the suspect’s behavior is key, Craven said. They then try to establish communication, build rapport and try to persuade the suspect to surrender.

It can be tough going, and the negotiator has to keep his or her cool with someone who be might be very angry, insulting or worse.

“It takes a special person to be a negotiator and it takes a lot of training to be a good negotiator,” she said.

Reach Glenn Smith at 937-5556 or Twitter.com/glennsmith5.