It wasn’t the first time the man had broken into the home, but it was the first time he’d been shot while trying.

Spokane police say the intruder barged into his neighbor’s home this weekend armed with “large kitchen style knives” in each hand – and was then shot in the chest by the homeowner.

The suspect had faced initial charges in an earlier break-in, according to court records, but they were dropped after a court-ordered competency evaluation.

When police asked Matthew Knapton, 40, why he allegedly tried to break in again on Sunday, he reportedly told them he was trying to get inside the home because his neighbors had an “illegal device inside that was manipulating the electronics in his home.”

Knapton was taken into custody Tuesday morning after undergoing surgery at a local hospital, where at one point he was listed in critical condition, court records say. Prosecutors on Wednesday filed first-degree burglary charges against Knapton, who remained in custody in lieu of an $80,000 bond set by Superior Court Commissioner John Stine.

Police say Knapton forced open the door of his neighbor’s home at 2014 W. 23rd Ave. in the Vinegar Flats neighborhood at about 1:45 p.m. Sunday while homeowners Greg and Janna Brown took refuge inside.

Records say Janna Brown saw Knapton walking up their driveway armed with what looked to be a metal pipe. The weapon was later determined to be two “large kitchen style knives” in his hands.

As Knapton made his way to the front door, records say, Greg Brown armed himself with a Glock 19 handgun, which he told police he purchased recently because of ongoing issues with Knapton.

Greg Brown reportedly locked the door and told Knapton he had a gun. Knapton then kicked in the front door right as Greg Brown fired, the couple told police. Surveillance video reviewed by investigators showed Knapton was hit once in the chest through the door, before turning around and leaving down the same driveway.

Whether Knapton actually kicked in the door was debated in court Wednesday. Anna Nordtvedt, Knapton’s public defender during his first appearance, said there was “no indication any part of his body entered the home,” which she said would indicate attempted burglary.

An attorney speaking on behalf of the prosecution pointed to the probable cause affidavit that cited the Browns saying Knapton did fully kick in the door.

“I agree with the state,” Commissioner Stine said. “As a matter of physics, I can’t imagine a scenario where someone kicks a door open without crossing the threshold.”

Officers later found Knapton near Inland Empire Way and 14th Avenue.

Detectives found the two knives on the edge of the Browns’ property, in addition to one single defect “consistent with a bullet strike” and a footprint on the door. The Glock handgun was seized, along with two cartridge casings.

Janna Brown, who told police she’d lived at her residence for all 64 years of her life, said Knapton had broken into their home before – twice in one night.

Court records show Knapton was arrested and charged with burglary in that incident. Records say he bashed in the Brown’s front-door window at about 1:30 a.m. Feb. 26, 2016.

That case was later dismissed when a court-ordered competency evaluation found Knapton had the mental capacity of a 5- or 6-year-old. He also was diagnosed with bipolar disorder and borderline intellectual functioning.

Dr. Daniel Lord-Flynn of Eastern State Hospital wrote in her report filed with the court in June 2016 that Knapton lacked the capacity to understand the court proceedings and participate in his own defense.

Deputy Prosecutor Mary Ann Brady dropped the charges in October 2016.

Janna Brown also told police that in May of this year Knapton broke out one of their windows with a baseball bat.