 -- A newly released video shows the horror of the moment when a man broke into an Idaho apartment by kicking down the door while wielding a machete.

"In my mind, it lasted for hours, but on the video it all happened in seconds," James Cvengros told the Idaho State Journal after seeing the video for the first time last week after handing over the footage to police as evidence.

The attacker, Twain Thomas, pleaded guilty to attempted murder and aggravated assault on Thursday and has been sentenced to up to 15 years in prison as a result, with five years fixed and an additional 10 years indeterminate, according to court records.

ABC affiliate NPG in Idaho reported that, in court, defense attorney Dave Martinez said neuro-psychologist Mark Corgiat concluded Thomas suffers from PTSD and frontal lobe damage due to a car accident.

The violent altercation took place in February 2014 when Cvengros heard a neighbor screaming and unlocked his door and looked down the hall to see what was happening. It is clear in the video that Cvengros has a gun in his hand.

Another person in his apartment, who Cvengros identified to the paper as his girlfriend, can be heard saying "Do not let him in!" as Cvengros closes the door and locks both a deadbolt and a chain lock.

Moments later, Thomas started kicking down the door of Cvengros' apartment and Cvengros can be heard threatening him, telling him he has a gun and using expletives.

After just seven kicks, Thomas is able to walk through the shattered doorway and, at that point, it becomes visible that he is holding a machete in his right hand.

Moments later, Cvengros fired three shots, hitting Thomas in the chest. Thomas survived.

Thomas' attorney, Dave Martinez, told ABC News that a neuro-psychologist who tested Thomas had concluded that the 55-year-old suffers from post traumatic stress disorder as well as brain damage from a car accident that occurred when he was a teenager. He also said that Thomas had a "traumatic" upbringing and had undisclosed hardship while serving in the military, when he was based in Germany during the first Gulf War, though he never served in a combat zone.

"Mr. Thomas doesn't have any animosity towards Mr. Cvengros," Martinez said. "We had a 55-year-old man who never had any history of violence and he snapped."

Cvengros told the Idaho State Journal that he turned the video over to police and had not seen it since, that is until it was played at Thomas' sentencing last week.

"Seeing the video kind of brought it all back," he told the paper. "But there's not a doubt in my mind that I did the right thing."