A D.C. Superior Court judge ruled yesterday that a search warrant used to raid a "swingers club" run by mayoral candidate Dennis Sobin was defective and the evidence seized could not be used against him.

Sobin and his attorney, Charles O'Banion, said the ruling by Judge Dyer Justice Taylor could mean that the city's charges against Sobin -- which include selling liquor without a license, not having an occupancy certificate for his club and failure to have a license to operate a public hall -- will be dropped.

City prosecutors said that while they were reassessing their position in light of the ruling, it was unlikely that all charges against Sobin would be dismissed.

Sobin, who says the case has cost him about $10,000 for lawyers and a private investigator, said yesterday that the ruling at least means he will be able to sleep in his double-king-size bed, which was seized in the raid. "I've been sleeping on a thin foam rubber mattress since the raid," he said.

Taylor ruled that the search warrant technically was defective because the raid -- which took place Feb. 20, 1981 -- occurred about six weeks after the police officers' initial observations of allegedly illegal activity in the home.

Sobin, who is campaigning for mayor on a pledge to eliminate the D.C. police department's vice squad, said he plans to sue the city for false arrest if the charges are dropped or if he is acquitted.

Sobin said about 40 people, including five D.C. police officers, were in the "Playground Swing Club" at his home on N Street SE when the raid occurred. In a press release last week, Sobin said the "invited guests were encouraged to participate in nude and sexual encounter activities." Seven persons arrested during the raid on sodomy charges were placed in a pretrial diversion program and the charges later were dropped.

The raid was sharply criticized by the American Civil Liberties Union and others who said the police were invading the privacy of adults doing what they wanted to do.

At the time of the raid, D.C. Police Chief Maurice Turner, then an assistant chief, said the club was raided not because of suspected morals violations but because the establishment allegedly was selling alcohol, operating as a public hall without a license and violating fire and zoning codes. Turner said those arrested on sodomy charges were arrested because that also is against the law.