Enrique Marquez, who supplied his longtime friend Syed Rizwan Farook with two assault rifles used to carry out the massacre in San Bernardino, Calif., was indicted by a federal grand jury on Wednesday on five charges, including conspiring with Mr. Farook in an earlier, unrealized plot.

Mr. Marquez, 24, who grew up next door to Mr. Farook in a suburban Southern California neighborhood, was arrested two weeks ago and charged with similar crimes as those handed down in Wednesday’s indictment. The grand jury’s action supersedes the previous charges and avoids the need for a preliminary hearing.

The indictment is a legal step forward in the federal government’s criminal case against Mr. Marquez. In addition to a charge of conspiring to provide material support to terrorism, he faces two charges of lying about the gun purchases and entering into a sham marriage with a Russian woman related to the Farook family through marriage.

Mr. Marquez has not been charged in the San Bernardino attack itself. Court papers say he was at work during the massacre.