Steven Kravetz, 34, was arrested at his mother's home in the state capital of Olympia nearly 24 hours after the courthouse struggle in the town of Montesano, about 100 miles from Seattle.
Friday around noon, Deputy Polly Davin responded to a report of a suspicious person at the courthouse and confronted a man. During a struggle, she was stabbed with either a small knife or scissors. Judge David Edwards intervened, striking the assailant, who then stabbed him, authorities said.
Davin reached for her gun, but it was wrestled away by the man, who shot twice, striking her in the shoulder before fleeing. The judge and deputy were treated and released from a local hospital.
Police say they do not know why Kravetz was at the courthouse on Friday in the first place, saying his motive remains unclear.
After the attack, Kravetz fled with the officer's .45-caliber handgun and showed up an hour or so later at the office of his former attorney and asked to the use the phone. The attorney had represented Kravetz a number of years ago and didn't know about the courthouse attack.
Investigators believe Kravetz called his mom, identified as Roberta Dougherty, at about 3 p.m. and that she apparently gave him a ride out of the area. Police do not know what Dougherty's involvement is, but they did say she's the one who called police and turned in her son. She said she called police after she saw a flier with her photo and her son's photo on Saturday.
The Associated Press contributed to this report.