Nearly three years after an Atlanta police officer was shot and nearly killed during a drug investigation, the man who prosecutors say shot him has pleaded guilty.

Officer Reginald Robinson had gone to a southwest Atlanta neighborhood near Ralph David Abernathy Boulevard and Evans Street the night of Jan. 11, 2013, to look into reported drug activity, Fulton County District Attorney Paul Howard Jr. said.

A man he was questioning at the scene, Frank Nance, 23, suddenly fled and Robinson gave chase. When he did, Nance, armed with an automatic weapon and with illegal drugs in his possession, shot Robinson in the face, Howard said.

Though he survived, Robinson had to under go at least five reconstructive surgeries for a shattered jawbone and other facial injuries.

Thursday, on the fourth day of testimony in his case in Fulton County Superior Court, Nance entered a guilty plea to a charge of attempted murder. He will be sentenced later and faces a maximum sentence of 45 years in prison.

Howard said Robinson, who has returned to work, “… escaped death by the narrowest of margins.”

Nance was a repeat offender, “… who should not have had a weapon and should not have been on the street,” Howard said.