POCATELLO, Idaho -

A man who broke into a Pocatello apartment with a machete and was shot was sentenced for attempted murder on Thursday.

On Thursday morning 6th District Court Judge Robert Naftz sentenced Twain Thomas, 54, to a five-year fixed sentence in the state penitentiary, and 10 years indeterminate on several counts of aggravated assault and attempted murder in the second degree.

On Feb. 22, police were called to the 200 block of South Garfield, where Thomas had been threatening neighbors that apartment complex with a machete. 

When Thomas broke into the downstairs apartment of James Cvengros and his girlfriend Kaila Gearhart, Cvengros shot Thomas.

Cvengros' action was ruled as self-defense.

Cvengros had a camera rolling to document the commotion after seeing glass flying from the upstairs apartment onto the cars parked below. He said once he heard unusually concerning noises coming from the apartment upstairs, he started documenting the commotion using his digital camera, not realizing that camera would soon serve as a witness to what was about to take place in his apartment.

The video was played during Thursday's sentencing, and in it, Thomas kicks in the door, and both Gearhart and Cvengros yell at Thomas to leave, warning him he needs to get out. After Thomas was shot, Cvengros tells Thomas he already called the police, and Thomas confirmed he was trying to kill Cvengros.

"If he hadn't been shot at that time, then we would be looking at a murder case, not an attempted murder case," Cvengros said.

During the trial, defense attorney Dave Martinez asked for a three-year fixed sentence with 10 years indeterminate.

Martinez said Thomas' neuro-psychologist Mark Corgiat found Thomas has suffered from both PTSD and frontal-lobe damage to his brain due to a past car accident.

"His fight-or-flight is constantly on overdrive," Corgiat said. 

Martinez said Thomas wasn't aware of what he was doing at the time, and finally snapped out of it once he was shot.

"I have never had anything like this happen before in my life," Thomas told the court in a solemn apology.

Prosecuting attorney Zachary Parris asked for a seven-year sentence, saying with Thomas' military experience and the strong, violent nature of the crime, he poses as a threat to the safety of society.

Naftz agreed on the five-year fixed with a 10-year indeterminate sentence saying any lesser of a punishment would depreciate the seriousness of the crimes he committed.

Along with the possibility of serving a total of 15 years behind bars, Thomas will also need to pay a $1,200 fine and the no-contact order will stay in place until 2025.