A Philadelphia police officer was shot and killed early Friday as he served a homicide warrant at a home, and several people were arrested, including the subject of the warrant, officials said.

Cpl. James O'Connor, 46, was shot around 5.45am in the city's Frankford section, officials said. He was shot in the shoulder above his bulletproof vest when officers entered the home, and two people in the home were wounded by return fire from another officer, officials said.

He was taken to a hospital, where he was pronounced dead a short time later.

The two wounded people were stable, authorities said. Authorities said their injuries did not appear to be life-threatening. Their names were not released.

Several people were arrested, including Hassan Elliott, a 21-year-old fugitive wanted in a robbery and slaying last year not far from the scene, District Attorney Larry Krasner's office said. Elliott was not among those injured, Police Commissioner Danielle Outlaw said.

Krasner's spokeswoman, Jane Roh, said more than one person inside the house had a gun. More charges were expected Friday as investigators determine "which bullet came from which person," she said.

"Elliott is currently in custody. We expect to bring charges for the March 2019 murder and additional charges following today´s incident shortly," Krasner said in a statement.

O'Connor, a married father of two including a son who also serves on the force, had been a police officer for 23 years and was with the SWAT unit for 15 years. His daughter serves in the U.S. Air Force.

"There´s not a word that you can put on the level of emotion that´s being felt right now," Outlaw said during a news conference outside the hospital. "As expected, it´s a whirlwind of emotions. These are people that leave their families, their loved ones, during holidays, birthdays, anniversaries, to protect complete strangers and to do work that´s a calling. These people are led to serve."

Elliott had been paroled in 2018 after serving about a year on a felony gun possession charge, court records show. He was later charged with violating probation.

In April 2019, a month after the fatal robbery, a bench warrant was issued. According to Roh, it took police some time to locate him before Friday's attempt to arrest him on the warrant.

A message left seeking comment from the Defender Association of Philadelphia, which represented him, was not immediately returned.

Philadelphia Mayor Jim Kenney said he was "grief-stricken" and ordered city flags flown at half-mast in O'Connor's honor.

"Today, like every day, he demonstrated the ultimate form of heroism: putting out his uniform, leaving his family and carrying out his sworn duty to protect the residents of this city," Kenney said.