— The Raleigh police officer who was shot in the line of duty in January has been released from the hospital, the department said Friday.

"We appreciate the immense outpouring of love, support, well wishes, and words of encouragement from the community," the department said on Twitter.

Officer Charles Ainsworth was following up on a report that a car stolen at gunpoint had been spotted in southwest Raleigh on Jan. 9 when he was shot several times, including in the neck.

As police responded to the shooting, an officer loaded Ainsworth into the back of a patrol car and began driving him toward WakeMed. He met an ambulance along the way, and Ainsworth was transferred to the ambulance for the rest of the trip.

He had been hospitalized at WakeMed since the shooting and had suffered a series of strokes, according to his family.

Cedric Jamal Kearney, of Henderson, is charged with attempted murder, two counts of assault on a law enforcement officer with a firearm and possession of a stolen firearm in the shooting.

In March, Ainsworth's wife told WRAL News that doctors have called Ainsworth’s recovery remarkable and that their family has received an outpouring of support from the law enforcement and the Triangle communities.

The first two weeks after the shooting, Jenny Ainsworth said, the family was "literally taking it hour by hour."

But as he continued to recover, she said, Charles Ainsworth would hug and kiss her and shoot his visitors with a Nerf ball gun his father had given him.

"His personality is back and that’s the best thing," Jenny Ainsworth said.