A scuffle among three or four inmates at Lorton's Youth Center 2 facility last night set off an hour-long fight during which 30 to 40 prisoners wielded makeshift weapons and at least one inmate was injured, D.C. Department of Corrections officials said last night.

Corrections spokesman LeRoy Anderson said that the melee began about 7:30 p.m. in a courtyard outside one of the facility's dormitories and as it spread inmates struck out at each other with rocks, chair legs and metal bars torn from beds.

Officials at the facility said the disturbance appeared to be "gang-related . . . a rumble," but Anderson said the 29 corrections officers on duty, backed by about 40 from elsewhere at the Lorton complex, were able to subdue the inmates without using tear gas. A dozen Fairfax County police officers were called to patrol the perimeter, and no escapes were reported.

Anderson said one shot was fired into the courtyard from a guard tower "to protect" an inmate who had been stabbed and was running for help toward the tower. Anderson said the shot did not strike anyone and that the inmate who was stabbed did not appear to be seriously injured.

Corrections sources attributed tensions between the facility's inmate factions to overcrowding. Youth Center 2 has an official capacity of 255 but houses about 300, Anderson said.

Youth Center 2 and the larger Youth Center 1 have been the scenes of a number of violent incidents in recent years. In December 1984, after two methane gas explosions at Youth Center 1 necessitated extensive renovations, 190 prisoners were transferred to Youth Center 2, sparking a massive riot between rival inmates of the two facilities.

A disturbance last June, which also began with an argument at one of the dormitories and escalated into a gang fight, lasted several hours and left seven inmates and three guards with minor injuries.

In January, six inmates and four guards were injured in a melee involving 60 to 100 Youth Center 2 residents. Two months ago, 350 inmates rioted after a power outage plunged Youth Center 1 into darkness. Eleven inmates received shotgun wounds as guards regained control.