CAMPBELL (CBS SF) — Prosecutors in San Jose have declined to file charges against a homeless man in the stabbing death of a teenager after concluding the man acted in self defense while being assaulted, authorities said.

Todd Tharp, 24, a transient who was arrested at a park in Campbell on Sunday following the stabbing of 16-year-old Ivan Diaz, was released from the Santa Clara County Main Jail on Tuesday night, Campbell police Sgt. Gary Berg.

Police and the Santa Clara County District Attorney’s Office made the decision after reviewing evidence that Diaz and at least three others were kicking Tharp after knocking him down prior to the stabbing, Berg said.

Tharp, 24, was arrested after police found him injured at 8:26 p.m. Sunday in the area of John D. Morgan Park at 540 W. Rincon Ave., police said.

Diaz, of San Jose, was taken to Santa Clara Valley Medical Center with a stab wound and pronounced dead at 2:55 a.m. Monday, police said.

Tharp and the four others, who were aged 15 to the early 20s, had been having a “positive interaction” that evening with each other when someone physically assaulted Tharp, Berg said.

Diaz and the others started kicking Tharp, who then stabbed Diaz, Berg said.

Authorities looked at evidence at the scene and results of an autopsy by the medical examiner’s office before concluding Tharp was trying to defend himself, Berg said.

“At this point the evidence suggests that Mr. Tharp was acting in self defense and the district attorney’s office is not filing charges at this time,” Berg said.

A representative of the district attorney’s office confirmed Wednesday that charges would not be filed against Tharp after the evidence indicated self defense.

© Copyright 2014 by CBS San Francisco and Bay City News Service. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.