CAMDEN, Maine — The police affidavit filed in order to get an arrest warrant for a man holding a pharmacist hostage at the Rite Aid Monday night offered more details about the ordeal, including that he held her as a “bargaining chip.”

The affidavit was filed Friday in Knox County Superior Court by Camden police. Police obtained the warrant to arrest 34-year-old Robert J. Beerman on charges of kidnapping, terrorizing with a dangerous weapon, possession of a firearm by a prohibited person and violating a condition of release.

Beerman died Monday night when he shot himself in the head with the sawed-off shotgun that he brought into the pharmacy.

According to the affidavit, Beerman entered the store at about 7:30 p.m. and waved the shotgun around. He ordered customers and all the staff except for the pharmacy manager to leave.

Rockport police Sgt. Travis Ford from the neighboring town arrived early on at the Rite Aid and spoke to Beerman through an intercom at the pharmacy’s drive-up window. Ford spoke with Beerman for a few minutes and the suspect identified himself to the officer, according to the affidavit.

Police were then also able to watch what was going on inside by remotely accessing the Rite Aid surveillance cameras in the store. A still photo of Beerman was taken and Camden police Detective Curt Andrick was able to identify Beerman as well.

Maine State Police negotiators were able to convince Beerman to let the pharmacist out unharmed after about three and a half hours.

The pharmacist told police after her release at 11 p.m. that he demanded drugs from the pharmacy. He also told the woman, who has worked at Rite Aid for the past six months, that he needed her as a “bargaining chip.”

Early on in the nearly eight-hour standoff, Beerman locked the front door to the store on the Elm Street (Route 1) side of the store, locked the back door and pushed a soda machine in front of the back door to prevent anyone from entering.

Maine State Public Safety spokesman Stephen McCausland said earlier this week that state police negotiators were in contact with Beerman by landline telephone on and off throughout the night. Beerman told negotiators that he was not going to harm the woman.

After Andrick got the arrest warrant, state police positioned an armored vehicle with a battering ram on Elm Street in front of the store and over a loudspeaker informed Beerman that he was under arrest and asked him to surrender.

When police got no response, the front door was knocked down, and soon after members of a tactical team entered and found Beerman dead in the employee break room at the back of the store.

Police are investigating where he got the shotgun.

This was the fifth time since 2010 that the Rite Aid in Camden has been robbed for drugs.