The House District Committee has moved to close a gap in local law that prevents judges from holding some accused murderers and rapists in jail pending trial.

The measure, approved last Monday and sent to the House floor for action, would permit the holding for up to 90 days of first offenders charged with first-degree murder or forcible rape if they are found likely to flee before trial or if they pose a hazard to the community.

Existing law permits the pretrial detention only of a potentially dangerous defendent who has a criminal record or backgraound. Others are entitled to bail or release on personal recognizance.

Sponsored chiefly by Rep. Romano L. Mazzoli (D-Ky.), the measure is similar to one that was passed by the House last year but never came to a vote in the Senate.

Under District of Columbia law, pretrial detention of first offenders is permitted only if they are accused of crimes punishable by death. Two U.S. Supreme Court decisions within the past decade eliminated the death penalty. Those decisions rendered the D.C. law inoperative.

U.S. Attorney Earl Silbert, supporting the pending proposal in testimony last May, said a public outcry resulted from one instance in 1975, when a judge found it legally necessary to free an accused slayer because he had no criminal record. The suspect was charged with stabbing an Amtrak employee to death on a sidewalk near Georgetown.

Under the proposed measures, the judge must hold a detailed hearing to determine whether the suspect might flee or would pose a danger to the community. While present law appears to give only the prosecutor the right to move for pretrial detention, the new measure would make clear that the judge could initiate such action.

The measure also would make some changes in the pretrial detention law as it applies to defendants in other situations as well.

At present, a judge may hold a suspect with a criminal record in jail for five days pending a decision on whether he may be released until his trial. The new measure would extend the maximum holding time to 10 days.

The measure also would require a trial of some detained defendants within 90 days, instead of within 60 days under existing law.

Before approving the measure, the Committee rejected moves by Del. Walter E. Fauntroy (D-D.C.) to delay action and by Rep. Thomas Coleman (R-Mo.) to add armed robbery to the list of crimes for which pretrial detention of first offenders would be permitted.

Fauntroy said many city government and law-enforcement leaders believe a speedy trial is preferable to pretrial detention.