A Philadelphia police officer fatally shot a naked man who attacked him Sunday in the city's Olney section, a department spokesman said.

Fearing for his life, the officer fired four times, striking the man three times in the chest and an arm, Lt. Raymond Evers said.

The two had struggled over the officer's gun, and the victim remained aggressive after being Tasered, Evers said.

"This was a violent struggle," he said.

Evers did not identify the officer or the victim, who he said was 31. Relatives told the Philadelphia Daily News the victim was Kenyado Newsuan.

Police said the encounter began around 6 a.m., when a passerby told an officer on patrol near the 5900 block of Mascher Street an unclothed man was running around.

When the officer, a six-year veteran, stepped out of his patrol car, the naked man attacked him, Evers said.

The officer Tasered the man, but it had no effect, and the struggle continued, Evers said. The man was pronounced dead at Einstein Medical Center at 6:22 a.m. Toxicology tests will be conducted, Evers said.

The officer suffered bumps and bruises, and his uniform was torn during the struggle, police said. He is on administrative duty pending an investigation by Internal Affairs and the District Attorney's Office, which is standard. The homicide department, which routinely investigates deaths involving police, is also looking into the case.

According to police, the victim had been arrested previously on charges including robbery and an assault on a police officer. The outcome of those cases could not be determined Sunday.

Contact Darran Simon at 856-779-3829, dsimon@phillynews.com, or follow @darransimon on Twitter. Daily News staff writer Morgan Zalot contributed to this article.