Federal officers walk along La. Highway 128 outside a Tensas State Bank branch during a hostage situation Tuesday in St. Joseph, La. A man whose family owns a store across the street from the bank took three bank employees hostage, then was killed around midnight after he shot two of the hostages, police said. (ASSOCIATED PRESS / Rogelio V. Solis)

ST. JOSEPH, La. (AP) — The gunman in a fatal hostage standoff wrote that he was angry at his ex-girlfriend’s family and believed they were responsible for a device in his head, the sheriff said.

Authorities said 20-year-old Fuaed (FOO-od) Abdo Ahmed shot two hostages, killing one, at a rural Louisiana bank on Tuesday before state police ended the hours-long standoff by shooting him dead.

The standoff began around 12:30 p.m. Tuesday when authorities said Ahmed took two women and a man captive at Tensas State Bank branch in St. Joseph, which sits near Louisiana’s border with Mississippi.

Charla Ducote, spokeswoman for Rapides Regional Medical Center in Alexandria, La., said the wounded hostage, LaDean McDaniel, was in critical condition Wednesday morning. She could not provide further details.

The slain hostage was identified by the sheriff as Jay Warbington.

Several acquaintances, including the town’s mayor, said they saw no signs of trouble with Ahmed before the shooting. But two neighbors heard the sound of gunshots coming from near his house on Monday and Tuesday before the standoff.

St. Joseph Mayor Edward Brown said he exchanged pleasantries with Ahmed about an hour before the standoff began.

Brown described Ahmed as “just normal. That’s why it’s so bizarre to me.”

During hostage negotiations, authorities were able to get Ahmed on the phone with a friend in Alaska, Louisiana State Police superintendent Col. Mike Edmonson said. That was crucial in convincing Ahmed to eventually release a female hostage.

Ahmed was mentally unstable and had written a letter “detailing exactly what he was going to do,” Edmonson said.

“He was mad at people that he said were mean to him,” he said. “He had voices in his head.”

Tensas Parish Sheriff Rickey Jones said the note was left in a van that Ahmed parked near the bank.

Jones said the note listed a number of people who Ahmed thought contributed to his problems. Among those were his ex-girlfriend’s family, whom he blamed for their breakup. Jones said Ahmed also thought they were responsible for a device in his head.

Jones said Ahmed wrote that he didn’t want to be arrested or given mental health treatment. He wanted to leave the country.

Edmonson said the man grew increasingly erratic as negotiations went on, sometimes hanging up on police. One of his demands to authorities was that they get the device out of his head, Edmonson said.

Eventually, Ahmed told negotiators he was going to kill the two remaining hostages. Edmonson said state police entered the building just before midnight Tuesday.

That’s when Ahmed shot the two hostages and then police shot and killed him, Edmonson said. Edmonson said both hostages were shot in the upper body.

The hostages were both shot with a handgun, but Edmonson said Ahmed was also armed with a rifle. He also had a duffel bag containing items he was going to use to torture the hostages.

“His intent was to inflict pain and kill these individuals,” Edmunson said.

Authorities say Ahmed didn’t use what was in the bag. State police didn’t immediately say what was in it.

Edmonson said there was no indication Ahmed had any history with the hostages, who were bank employees, and authorities did not know why he picked the bank. The bank sits across the street from a service station owned by Ahmed’s family.

“These were good, God-fearing people,” he said of the hostages.

Edmonson said Ahmed’s parents were from Yemen, but he was a U.S. citizen. The detailed list of grievances and demands gave no indication that he had a political or religious motive, Edmonson said.

On a Facebook page under Ahmed’s name that was set up in the spring, Ahmed describes himself as a native of Fresno, Calif. On the page, he is seen in photos smiling and wearing a baseball cap backward, and with friends.

Ahmed discusses philosophy of life from the Tao Te Ching, a 6th century BC Chinese text, and is a fan of comedian Jerry Seinfield, rapper Eminem and Islam. He makes no specific references to political or religious extremism.

But recent posts show a darker side.

In a post on Sunday, he displays a cartoon strip that focuses on an apparent hostage situation. In it, a gunman points a pistol at a hostage. “I’ll release the hostage if you give me a sandwich!” says the gunman in the strip.

Negotiators in the next frame then talk about the demand, with one asking “How close is the nearest deli?” ‘’Three blocks,” the second man replies.

“Okay, you can kill the hostage,” one negotiator calls back to the hostage-taker.

Ahmed’s final post, made Tuesday just hours before the hostage standoff began, is of a photo of a man with a sword attacking a tank. Under the photo is a quote from the novel “If This Goes On,” a 1940 science-fiction novel by Robert Heinlein that speculates on life in a futuristic American theocratic Christian society.

Ahmed’s next-door neighbor, Nelda Bass, said she heard a single gunshot on Monday afternoon and saw Ahmed holding a rifle in his yard when she went outside to look around. He went inside when he saw her, and she didn’t call police at the time.

Bass said the house has been occupied by a group of men for several years, and she didn’t recall any women or children living there during that time.

“I didn’t know them well,” she said. “Some were friendly and would wave and say ‘hi,’ but some were standoffish and wouldn’t speak to me.”