CALDWELL -- An all-day standoff at a Caldwell business ended at around 6 p.m. with the gunman's arrest, officials said.

The man was cleared medically before being booked into the Canyon County Jail, officials said.

The suspect was identified Thursday as 57-year-old Jens Randall Davis of Payette, an employee at Forterra.

Canyon County Sheriff's Office Capt. Bill Adams said deputies were called to the company at around 8:24 a.m. They responded to a report of a worker carrying a firearm who was acting irrationally.

According to Adams, co-workers weren't comfortable with Davis being there.

"Deputies responded and began speaking with the man and he, for whatever reason, just wouldn't cooperate and it got to he point where they saw the weapon on him," Adams said.

Adams said it was his understanding that the man had the gun in his waistband and never drew it, pointed it at anyone or threatened anyone with it.

"He simply was just not acting right and he had a visible weapon," he said.

According to Adams, the company was able to get the employees away from the property and secure the area before deputies got to the scene.

Adams said the man had fired shots inside - through a wall and through doors.

"I believe initially there were a few rounds fired and then I heard some more when the SWAT team members were deploying gas into the building so I believe it's maybe a reaction to the gas being thrown into the building to the gas coming into the structure," he said.

"The ultimate outcome, obviously, is for him to come out of there alive, intact and we can figure out what the problem is and get him the help that he needs and for nobody to get hurt."