An Albany police officer was shot in an exchange of gunfire on North Main and Western avenues early Wednesday morning.

Police say that, around 12:30 a.m. Wednesday, the officer and a suspect "exchanged gunfire" during a traffic stop. The officer was shot in the upper leg in the exchange, and the shooting suspect was killed.

Albany Police Chief Eric Hawkins, in a press conference Wednesday morning, said after a pursuit of a car traveling at a high rate of speed, the officer spotted and approached the suspect's car, and the suspect "immediately fires shots at the officer and strikes the officer." Hawkins said the suspect was out of the car and behind it when the shooting occurred.

"I've had the opportunity to look at the body-worn camera, and there's no other way to describe it but an ambush," Hawkins said.

One gun was confiscated at the scene, and more than 10 shell casings were recovered, according to the chief. The state attorney general's office is expected to investigate the incident, and Hawkins said the APD has also been in touch with the Albany Community Police Review Board, should it wish to conduct an investigation.

The officer was alert and conscious at Albany Medical Center; Hawkins said the officer was due to go into surgery Wednesday afternoon. An autopsy is being performed on the suspect Wednesday as well.

"Considering the circumstances, his spirits are high," Hawkins said of the officer. "He's got a lot of support."

Neither the officer nor the suspect have been identified. Hawkins said the officer is "fairly young" and has been on the force for "2-3 years."

The suspect was said to be in his mid-to-late 20s.

"We have an idea that the suspect has a somewhat troubling history in the past, not necessarily in Albany ... It's a person that has had some challenges in other places," Hawkins said.

The shooting comes days after a man allegedly opened fire and killed a police officer and sheriff's lieutenant Sunday night in Salina, near Syracuse.

"I have been in contact with my colleague in Syracuse, Mayor Ben Walsh, who is dealing with the loss of officers in a frighteningly similar type of situation," Albany Mayor Kathy Sheehan said.

"It highlights that when you combine guns with individuals who are struggling, you can have these types of outcomes."