Guards quelled an uprising at the overcrowded 177-year-old Maryland Penitentiary in less than an hour, but officials were unsure Tuesday what sparked the knifings and gunshots that left 12 people injured.

In Massachusetts, about 30 inmates, some with metal pipes and clubs, brawled in an exercise yard at a maximum-security prison, officials said. Two sustained minor injuries in Monday's disturbance.Authorities here were trying to determine whether a corrections officer shot a fellow guard during Monday afternoon's riot. The injured officer was one of four guards still hospitalized Tuesday after order was restored at the downtown maximum-security prison.

In all, eight guards, three inmates and a prison psychologist suffered broken bones, knife wounds or gunshot wounds in the melee.

"I think the warden acted properly. I think . . . he took action as soon has he felt there was something unusual happening," Gov. William Donald Schaefer said in defense of prison warden James Rollins.

The disturbance began in a yard about 12:45 p.m., spread to the clinic where the psychologist was conducting a session with inmates, and erupted again in another section of the yard, said a state police spokesman, Cpl. Greg Shipley. He said a minor fire also was set in the clinic.