A Northern Virginia construction company and its two top officials were indicted yesterday on charges of violating federal safety standards on a job in which two young construction workers were killed in 1978 when a 17-foot ditch collapsed and buried them alive.

S.O. Jennings Construction Corp. of Fairfax County and its two top officials, Bruce Jennings and S.O. Jennings, were charged with three safety violations in an indictment returned by a federal grand jury in Alexandria.

The indictment marks the first federal criminal charges filed in a U.S. crackdown on allegedly unsafe construction working conditions in Northern Virginia, an official with the Occupational Safety and Health Administration (OSHA said yesterday.

Each of the three criminal misdemeanor charges carries a penalty, upon conviction, of up to six months in prison and a fine of $10,000.

The charges were sought after state officials said inspectors had found it least a dozen previous trenching violations by the company in the last 12 years.

The Fairfax Board of Supervisors, upset about what it felt was inadequate policing of construction sites by Virginia safety officials, recently launched a joint inspection program with the federal agency. There have been at least 18 construction related deaths in the fast-growing Northern Virginia suburbs durng the last two years.

Yesterday's indictment climaxed a two-year federal probe that began after the deaths of Robert Baker and Michael DeGroot, on July 18, 1978.

The two workers were laying sewer pipes for Jennings at an Annandale subdivision when the 135-foot long ditch collapsed. The first slide trapped DeGroot and Baker up to their waists, workers later recalled. DeGroot tried to free his legs and was reaching for Baker a few feet away when the second avalanche buried both men.

Hours later DeGroot was found buried seven feet underground. Baker was under 18 feet of dirt.

The indictment alleges that Jennings "willfully and unlawfully" failed to brace the ditch to prevent a slide or cave-in, that soil from the trench was stored too close to the edge and that heavy equipment loaders were operating along the edge. The alleged unsafe conditions caused the two employes' deaths, the indictment says.

Bruce Jennings said yesterday, "We're innocent of any wrongdoings," but declined further comment. S.O. Jennings could not be reached.

Fairfax County prosecutors previously had declined to bring criminal charges, saying that Virginia's code sections on trenches were too vague to support a criminal case.

Baker and DeGroot, both 25 when they died, were childhood friends. The families of the two men each received $1,000 for funeral expenses under Virginia's no-fault workmen's compensation law.

That law provides for injured workers to receive benefits free of charge while the workers in turn give up their right to sue for damages.

In a test of the workmen's compensation law, the DeGroot family filed suit against Jennings for $1.6 million in Fairfax County Circuit Court earlier this year. Both sides are awaiting a ruling from Judge Thomas J. Middleton on whether the case can proceed to trial.

Douglas J. Sanderson, an attorney for the DeGroot family, said the suit is an attempt to establish the precedent that the ban on civil suits does not apply to instances where companies have committed "particularly intentional and gross acts."

OSHA has already assessed more than $24,000 in civil penalties against Jennings for the accident, but the final disposition of that action has been postponed pending the outcome of the criminal case.