Cedric Jamal Kearney was one of four people charged in the case.
Kearney, 26, pled guilty on March 10, 2020, to charges of carjacking and aiding and abetting, brandishing a firearm in furtherance of a crime of violence, and possession of stolen firearms.
According to court documents and other information presented in court, Kearney shot Ainsworth two times on Jan. 9, 2019.
Ainsworth was critically wounded after being shot multiple times while investigating a stolen vehicle at an apartment complex on Western Boulevard near Schaub Drive.
Kearney was found several hours later in a shed of a nearby homeowner; still in possession of the gun used in the shooting of the officer.
"Today was a good day for both the Ainsworth family and the justice system. The Court sent a very clear message that these type of assaults on law enforcement simply will not be tolerated," Acting U.S. Attorney G. Norman Acker said of Judge Flanagan's sentencing.
Ainsworth, an NC State graduate, underwent a year of recovery from being shot multiple times in the line of duty before returning to work.
"Most employees can tell you where they were and what they were doing when Charlie had been shot in the line of duty and was in critical condition," said Deputy Chief of Police Karen Riggsbee at a welcome-back ceremony for Ainsworth in January 2020. "But, we are a resilient department and just as quickly, employees responded in from home and deployed to the hospital and to the scene to help in any way they could."
Ainsworth endured numerous surgeries and grueling physical therapy.
He was released from the hospital in April 2019.
SEE ALSO : Raleigh Officer Charles Ainsworth still pushing through recovery after being shot