DETROIT (AP) — An undercover trooper with Michigan State Police was shot and critically wounded early Tuesday as he and other members of a narcotics unit were conducting surveillance in Detroit, police said.

The trooper was struck by gunfire around 1:30 a.m. EDT on Detroit's west side as he and other members of the narcotics unit came under fire, state police said.

The male state trooper remained in critical condition at a hospital around 8:40 a.m. and his family was with him, police said.

Two suspects in the shooting were in custody and an apartment at the complex where the shooting occurred had been searched and bullet casings were found, state police said.

The shooting investigation was continuing and “the situation is still very fluid," state police said on Twitter.

Earlier, the police agency said its emergency support team was moving people out of the apartment complex and was seeking a search warrant for the apartments.

Residents were told by police to remain inside during the manhunt.

“And since he’s already fired at us, it’s probably not likely that he’s not going to fire at somebody walking through that neighborhood," police Lt. Mike Shaw told WJBK-TV.