Authorities have announced charges against a man in what they called an ambush-style shooting that critically wounded a police officer in northeastern Pennsylvania last week.

Aiden Gabriel Deininger, 20, of Old Forge is charged in Lackawanna County with three counts of attempted homicide of law enforcement officers, criminal homicide and other charges in the shooting of a Scranton police detective about 4:30 a.m. Thursday.

Officials said three Scranton police detectives were sitting in an unmarked police vehicle on the city's west side because they had information that a shooting was about to occur. Authorities said the suspect, later identified as Deininger, spotted the police vehicle and fired five rounds into it, hitting police Detective Kyle Gilmartin twice in the head.

OHIO POLICE FATALLY SHOOT SUSPECT IN GIRLFRIEND'S MURDER AFTER PURSUIT

Another officer returned fire five times, hitting the suspect, who collapsed nearby. Officers rushed the wounded officer in a patrol vehicle to Geisinger Medical Center, and the suspect was also taken to the hospital, authorities said.

Scranton police shooting scene

Troopers are photographed near the scene of a police officer's shooting in Scranton, Pennsylvania, Thursday, Jan. 11, 2024. (Christopher Dolan/The Times-Tribune via AP)

District Attorney Mark Powell vowed to "aggressively prosecute" and seek "maximum penalties," saying he believed the suspect knew the people in the car were police officers. Authorities said they believed two earlier shootings into homes were related; another man has been arrested on charges in those cases.

Deininger's actions were "brazen, reckless and without regard to human life," Powell said. "Simply put, it was an ambush, and it's a miracle that only Officer Gilmartin was struck." Without the actions of other officers who were with Gilmartin or quickly arrived, "this tragedy would have been worse."

"Think about it — five shots, at point-blank range, into a vehicle containing three police officers," Powell said. Gilmartin remained in critical condition, but he was doing "remarkably well," Powell said.

"The dangers and demands of being a police officer are real and with significant sacrifice," Powell said. "My office will have zero tolerance for any violence against a police officer, and this type of violence has no place in Lackawanna County."

CLICK HERE TO GET THE FOX NEWS APP

Deininger was arraigned Wednesday in his hospital bed and will be taken to county prison without bail when he is discharged. Court documents don't list a defense attorney, and a listed number for the defendant could not be found Wednesday. The county public defender's office said it had not been contacted.