Suporters of a campaign to legalize gambling in the District of Columbia won a major procedural victory yesterday when a federal judge ordered the U.S. attorney's office to temporarily stop enforcing a law that bars the hiring of people to collect signatures on election petitions.

The temporary restraining order issued by U.S. District Judge Louis F. Oberdorfer will remain in effect for 10 days. If the judge decides later to keep the order in effect, it would greatly increase chances that an initiative measure to legalize gambling would qualify for the ballot at next year's May 6 primary election.

"Even at thei preliminary stage," Oberdorfer declared in a four-page order, "it appears that the provisions [against hiring signature collectors] constitute an infringement of rights protected by the First Amendment."

The First Amendment protects the rights of the public to free expression.

Oberdorfer ruled in a case brought by the D.C. Committee on Legalized Gambling, a group that was formed to campaign for an initative measure to authorize parimutuel betting and establish a city-run lottery.

The committee is supported chiefly by the Washington Jai Alai Corp., which is owned by 17 prominent Washingtonians, most with ties to leading political figures, and by the D.C. Retail Liquor Dealers Association.

The Committee failed for the lack of sufficient signatures on petitions last August to get the measure on the November ballot. At that time, its officials acknowledged hiring about 50 young people to collect the signatures.

When that was disclosed to be an apparent violation of law, the city's Board of Elections and Ethics referred the question to the U.S. attorney for possible prosecution. The matter is still pending.

With the gambling committee renewing its effort to put the issue on the ballot -- this time at the May 6 primary -- it asked the court last week to prohibit enforcement while more signatures are being collected.

The committee said it wants to hire signature collectors again. It also said it would challenge the validity of the provision that says such hiring is illegal.

The Board of Elections has set a Jan. 6 deadline for submission of petitions in order to get the issue on the May ballot. About 12,000 valid signatures of registered voters are required.

In his ruling yesterday, Judge Oberdorfer referred to "the likelihood that the plaintiff [the gambling committee] will prevail on the merits of this issue."

Oberdorfer said he found it appropriate for a federal court to give the committee a chance to claim the constitutional protection. But he said he may decide that the question of the law's validity should be considered by the D.C. Superior Court.

The judge is expected today to schedule a hearing on a possible extension of the restraining order.

Spokesmen for groups of organized black protestant ministers who have opposed legalized gambling on moral grounds could not be reached for comment.

A lawyer who represented the ministers in an earlier attack on the proposed gambling initiative said it is possible that they would petition Oberdorfer to be reprsented in further hearings in the case. But no decision had been made last night.

Martin E. Firestone, lawyer for the gambling committee, said he was delighted by Oberdorfer's ruling.

U.S. Attorney Carl S. Ruah could not be reached for comment on Oberdorfer's ruling. One of his assistants, John Polk, said last Friday that he knew of no local precedent for a judge barring the enforcement of a criminal law.

In his ruling, Oberdorfer said Rauh's office "shall not, for 10 days . . . sign, file or serve any indictment or (writ of) information charging a violation" of the provision of law against hiring signature collectors.

This, the judge signature declared, "will not affect investigation . . . of any suspected law violations or any presentation to grand juries about them."