ST. PETERSBURG, Fla. (WFLA) — A St. Petersburg man is being accused of stabbing a victim near his heart at a public library on Friday afternoon.

According to an arrest affidavit, 28-year-old Tavaris Cunningham was sitting next to the victim in a computer area at the Mirror Lake Community Library, located at 280 5th Street North in St. Pete, when he began “to act erratically.”

When the victim asked Cunningham to calm down, he pulled a knife from a bag. Officials said Cunningham stabbed the man in the upper right chest area.

“I stabbed him in the heart,” Cunningham told St. Pete police. “I stabbed him above the waist, means 25 years to life.”

The victim also had lacerations to his left thigh and left hand, the affidavit said.

“I stabbed him in the thigh because he was attacking me,” Cunningham added.

The victim was treated for his injuries, but his current condition is unknown.

According to the affidavit, Cunningham is facing a second-degree attempted murder charge. He is being held without bond.