A natural gas explosion leveled the Greene County government building in Stanardsville, Va., yesterday morning, injuring about 15 people and setting off a fire that gutted the adjacent courthouse.

Police said the foreman at a nearby construction project dashed into the government building just after 10 a.m. and warned employes that a gas line had been ruptured by construction equipment. Moments after workers left, the blast shattered the building and set its rubble afire.

"We got all of the people out before it blew," said Harold Chapman, sheriff of the rural county seat located in the foothills of the Blue Ridge mountains about 100 miles southwest of Washington.

Hampered by a water shortage, firemen took three hours to bring the blaze under control. By then, fire had reduced the adjacent courthouse to a brick shell.

A doctor treating injured at the scene said 15 people were hurt, six or seven of them seriously. They were taken to the University of Virginia Hospital in Charlottesville, 35 miles south of Stanardsville.

The two-story brick building housed the offices of county clerks, the county administrator, the school board, the commonwealth's attorney, the county registrar, the treasurer and the commissioner of revenue. Most county records were believed to have been destroyed.

Witnesses said bullets stored in the building exploded for several minutes after the blast.