HOUSTON  A federal prison in Texas erupted in violence early Friday when two gang-related fights broke out almost simultaneously in facing housing units. One inmate was killed, and 22 were injured, officials said.

It was the second outbreak of fighting in a federal lockup in Texas in three weeks.

The prison, the Federal Correctional Institution in Three Rivers, was locked down as F.B.I. agents began an inquiry, the Bureau of Prisons announced. The prison, between San Antonio and Corpus Christi, houses 1,160 men.

The fights, which broke out about 6:20 a.m., were quelled with the help of 10 nonguards  plumbers, electricians, secretaries and other workers  who happened to be reporting early, said Richard Wechsler, local president of the American Federation of Government Employees, a supervisor and a former guard at the prison.

The employees, like the guards, were unarmed according to practice, Mr. Wechsler said, “but they could start yelling, using their radios and grabbing inmates.”