Jonathan Kyle Courtney was armed with a pellet gun when walked into the Barnes and Noble bookstore and began firing, Cary police said. Two people were injured.

CARY, N.C. — Police in Cary say two people were injured in a pellet gun after an 18-year-old opened fire inside a bookstore.

Around 7:10 p.m. Friday, Jonathan Kyle Courtney was armed with a pellet gun when walked into the Barnes and Noble bookstore and began firing, Cary police said.

Two people were hit by the pellets and were wounded. The call was put out as an "active shooter" despite the use of a pellet gun by the suspect, police said. A male and female were taken to the hospital with minor injuries, officials said.

"The way they had it taped off, the way they had the perimeter, my first thought was 'shooter,'" a neighbor said. "The first thing I did was make sure my door was locked. Luckily for me, my fiance wasn't home. I immediately called her and told her to stay away from the townhome."

There were several Cary police cars and several Wake County deputies around the Barnes and Noble.

There was also one ambulance at the scene, according to a witness at the scene.

"There were some shook up people for sure," said Capt. John Szymeczek with the Cary Police Department. "Although they were BB guns, they are very realistic looking replicas. It was a traumatic event for those folks."

He added that one of the two people taken to the hospital suffered a "sort of panic attack situation."

The injuries appear to be minor, police said.

Courtney was taken into custody and has been charged with two counts of felony assault with a deadly weapon and one count of discharging a barreled weapon into an occupied property.