GREENVILLE, N.C. (WNCT) — A standoff between Greenville police and a suspect who shot an officer Tuesday night ended with a man in custody.

Greenville police posted to Facebook that after a more than 5-hour standoff, officers made entry into the apartment and successfully took the suspect into custody. A 9-month-old child who was in the home with him is safe and was not injured.

Charges were expected to be issued against the unidentified man who police said shot an officer as he tried to respond to a possible domestic dispute Tuesday night around 8:30 p.m. It led to a tense standoff that police ended around 2 a.m.

Greenville Police Public Information Officer Kristen Hunter said they responded shortly before 8:30 p.m. to 600 A2 Glendale Drive, just off Hooker Road, after receiving an “open line” 911 call, believed to be a domestic dispute. An officer who arrived to check on the situation was shot at through the door of the apartment.

The officer was injured and rushed to ECU Health Medical Center. He was expected to recover. Officials initially were uncertain whether the officer’s injuries were from shotgun pellets or shrapnel from the door. Just after 10 p.m., officials confirmed his injuries were from being shot.

In a Facebook post just after midnight, GPD reported the suspect was still barricaded inside the apartment. Officials said GPD’s Emergency Response Team was on the scene and evacuated neighboring apartments. Anybody whom officers had not instructed to evacuate was told to shelter in place.

Others were asked to avoid the area. The roads around the area were blocked off to traffic but eventually reopened.