A gunman surrendered to authorities after releasing three people he held hostage in a North Carolina drugstore early Friday after a robbery attempt, police said.

The 46-year-old Gastonia man surrendered several hours after releasing the employees in the store after he tried to rob it, Belmont Police Sgt. John Wilson said.

The man was being questioned by police. Wilson said he would face felony charges.

Officers were called to the store shortly after 1:45 a.m. and exchanged gunfire with the man before realizing there were hostages in the store in Belmont, about 15 miles west of Charlotte, police said.

The man had an SKS rifle with several loaded magazines, police said.

"He started screaming that he had hostages," Police Chief Charlie Franklin said. Two men and a woman were in the store.

The officers left the store and called for assistance. Officers from nearby Gastonia, Gaston County and Mount Holly surrounded the store while negotiations were held with the man.

The hostages were released shortly after 4 a.m. There were no injuries, Wilson said.

"He told hostages he would not harm them, if they just did what he told them," Franklin said.

A police negotiator convinced the man to surrender around 7 a.m. Police say he was calm when he exited the store.

"He laid the weapon down on the counter and came out with his hands in the air," Franklin said.

Police had been able to monitor the suspect through a live video feed from the store.

"It gave us insight into what area of the store he was in and what state of mind he was in," Franklin said.

Police said they watched as the gunman took several prescription pills from the pharmacy and swallowed them. They were not immediately certain what medications were taken.