Deputy James Atterberry Jr. was shot after a handcuffed inmate, Larry Gordon, started a fight in a corridor and wrestled the victim's gun from him, Berrien County Sheriff Paul Bailey said.
Gordon shot and killed two bailiffs that came to Atterberry's aid, 63-year-old Ronald Kienzle and 61-year-old Joseph Zangaro.
As Gordon tried to take hostages, he shot a civilian, Kenya Ellis, in the arm. Two other bailiffs and several other officers took Gordon down.
"This could have been a lot worse without them being so brave to go into the gunfire and take this person down," Bailey said.
Atterberry and Ellis were both taken to the hospital. Atterberry was released Wednesday and is recovering at home.
Employees returned to the Berrien County courthouse on Wednesday. It reopened to the public Thursday.