STATESVILLE, N.C. -- A Statesville man was arrested Tuesday in connection with the shooting of a police officer.

Keith Lackey, 21, was charged with two counts of attempted first degree murder, two counts of assault on a law enforcement officer with a firearm, two counts of assault with a deadly weapon with intent to kill inflicting serious injury and discharging a firearm in the city limits.

Police said the arrest was made around 11:15 a.m. at 212 Island Ford Rd. in Statesville.

RELATED: Statesville officer shot in the back, bulletproof vest stopped the bullet

On the night of June 15, Officer Tyler Horn was on foot patrol on Fifth Street when he was shot in the back. Police said a bulletproof vest stopped the bullet. Horn was taken to the hospital, treated and released.

“The shooting unsettled both the community and my officers. We conducted a very thorough investigation, canvassed the neighborhood, questioned residents. But we also understand that when a shooting occurs, especially one in which a police officer is hit, the situation can be tense," said Statesville Police Chief Joe Barone.

The chief added the events of last Friday night were very stressful for everyone involved.

“I got the phone call that one of my officers had been shot, and my heart sunk. We are like family here, and their welfare is important to me. I can’t thank them enough for the job they do for our city,” said Chief Barone.

After being processed at the police department, Lackey was taken to the Iredell County Jail, and bond was set at $3 million.

Sign up for WCNC NBC Charlotte’s 5 Things to Know newsletter and get the latest in your inbox each morning.