OAKLAND — A 25-year-old Oakland rapper who cut off a homeless man’s fingers with a machete during a 2015 confrontation on the streets of East Oakland was acquitted of all charges by an Alameda County jury on Thursday.

John Nolan Henry III testified that his severing of James McCormick’s four fingers was an accidental consequence of McCormick reaching for the machete as he was pulling it back so that McCormick couldn’t grab it. The prosecution argued that Henry was the aggressor and was seeking an aggravated mayhem conviction, punishable by life in prison.

Henry, a rapper who performs under the name “Militant Bamsavage,” said he bought the machete when he was doing landscaping work and kept it in his tool box for protection. He reportedly has used the machete as a prop in a rap video.

Henry has been in jail without bail since he was arrested a few weeks after the March 23, 2015, incident and is expected to be released from Santa Rita Jail Thursday night.

“We are gratified by the jury’s verdict and believe that they made the right decision in view of the evidence,” said Henry’s attorney, Kathleen Guneratne of the Alameda County Public Defender’s Office. “Mr. Henry is looking forward to returning home to his young son and getting back to work.”

Authorities said McCormick was maimed by Henry on Clara Street following an argument in a drive-thru lane at a Jack in the Box on Hegenberger Road.

McCormick accused Henry of nearly hitting him with his car in the drive-thru lane and started pounding on his window. McCormick claimed that Henry chased him into the street with the machete outside the restaurant, but witnesses said Henry just brandished the machete to scare off McCormick, who they said appeared to be high on drugs.

McCormick testified that he had used methamphetamine that day, but that it wasn’t affecting him. He said he was walking on Clara Street a short time later when Henry attacked him with the machete.

Guneratne argued that Henry was outside his home when a belligerent McCormick approached, still angry over the Jack in the Box encounter. Henry was trying to defend himself and scare off McCormick a second time when the accident occurred. He was in the process of unsheathing the machete when McCormick reached for it and Henry snapped it back toward himself, she said.

The four fingers were severed from the hand around the knuckle line and still attached to each other when they fell to the street. They laid there for days before they were recovered.

McCormick’s right hand was a bloody stump when he then walked to go buy vodka from a liquor store, where someone called 911 at the sight of him.