PALMYRA, Maine — An armed man who caused a standoff at the Wal-Mart Supercenter in town has been taken into custody but has not been arrested, Maine State Police Maj. Brian Scott said from the scene.

“He called the regional [police dispatch center] and said he was armed and that he was going to commit suicide,” Scott said. “The gentleman said he was suicidal, had a firearm and he was planning to kill himself.”

The 29-year-old man from Corinna, who was not identified by police, called 911 at 10:30 a.m. and the first police unit from Newport Police Department arrived within minutes.

“He may have made other calls,” Stephen McCausland said, responding to questions from the man’s mother, who indicated she called 911.

State police negotiators talked the man into turning himself in and he was taken into custody shortly after 1 p.m., Scott said. The type of firearm was not identified and no shots were fired.

“We did have negotiators in contact with the suspect. They were able to successfully talk him into coming out of the vehicle so he can get some help,” Scott said.

“I don’t have any information about why at this time,” he said later.

The store was put into lockdown, with employees and customers, estimated to be about 100 people, kept inside as a precaution, and between 30 and 40 Maine State Police troopers, tactical team members and negotiators as well as county deputies from both Somerset and Penobscot arrived to assist.

The armed man had parked his car in the corner of the parking lot and it was stationary throughout the event, the major said.

“The individual will be taken to a hospital,” Scott said. “We haven’t determined if there will be charges.”

Lovley’s Motel was evacuated and Route 2 was closed to traffic.

During the standoff, three of the armed man’s friends stood by the roadblock waiting for word. All three said they have known the distraught man for years but declined to be identified.

“I think all he is doing is crying for help,” one friend from Harmony said.

“He’s a good guy,” said another friend from Dexter, who said the two trained together in mixed martial arts. “He’s a good man at the end of his rope.”

The friends talked about how the man was recently hurt in an accident and hasn’t been able to find work since.

Other friends and family also arrived at the scene, police said.

Others, who worked at Walmart or who had friends working there, gathered in the Irving parking lot to support each other during the standoff.

“I have so many people that I care about in that store,” Courtney Currier of Pittsfield said while waiting.

Shortly after the man was taken into custody, traffic resumed on Route 2 and into the store.

Details about the man, including whether he legally possessed the weapon or if he has any prior arrests, was not immediately available, Scott said.

“I don’t have any [additional] information at this time,” the major said.

Most people were accommodating during the standoff, Scott said.

“Our major concern was to make sure we kept the public safe while we were serving this gentleman’s needs and getting him the help he that he needs,” Scott said.

Watch for updates.