A federal judge in Philadelphia yesterday unexpectedly threw out most of the Justice Department's unprecedented civil suit charging the city of Philadelphia and its top officials with condoning systematic police brutality. pU.S. District Court Judge J. William Ditter Jr. said in his 44-page opinion that the government had no "standing" to file the suit because Congress had not given it specific authority to make such sweeping allegations against officials for the conduct of subordinates.

"This complaint therefore must be dismissed without ever testing the merits of its deeply serious charges," he said.

Ditter also criticized department officials for the public statements about the case.

Assistant Attorney General Drew S. Days III, head of the department's Civil Rights Division, said he would study the order for a possible appeal. Days and then-attorney general Griffin B. Bell approved the suit in mid-August in an attempt to attack a wide-spread problem.

The government filed criminal charges -- and got convictions -- against several members of the Philadelphia police force who beat blacks and Hispanics. But the civil suit was the first effort to go after policymakers to force insitutional changes.

Justice officials said from the start that "standing" was a potential problem in the case.

Ditter's action yesterday was considered somewhat unusual because he was not ruling on a motion by the defendants to dismiss the case. "It is clear that to recognize standing in the case would be a vest an excessive and dangerous degree of power in the hands of the attorney general," he said.

"This power in essence would permit the Justice Department to bring a civil suit against any state or local administrative body merely because the attorney general and his subordinates have determined that the defendants' operating policies and procedures violate any one of the civil rights guaranteed to citizens."

Ditter also accused Bell of "playing to the press" by announcing the suit was being filed just as he left office. And he also criticized the department's attorneys in the case, saying they repeatedly "made sensational public statements which created the clear impression that the investigation was completed, that the evidence was all in, and the defendants' guilt had been established beyond doubt."

The judge said he planned to bring the case to trial by Oct. 15, but the government protested it hadn't had time to locate and interview witnesses.

The only part of the case left is one charging Philadelphia with violating the federal revenue-sharing act by discrimination in law enforcement.

Ditter noted that what remained in the case "does not even approach the mammoth proportions of the lawsuit which the plaintiff attempts to bring."

The judge also seemed to attack the timing and motivation of the department's suit against Mayor Frank Rizzo and other officials who are leaving office in January.

"To put it bluntly, the government's timetable, in combination with its press releases, amounted to a stacked deck, the effect of which was to deny the defendants their day n court," he said.

Sheldon B. Albert, the attorney for the city in the case, said Ditter's ruling means "the case is over." When the suit was filed, Albert charged the Carter administration with "pandering to the Hispanic and black community because they perceive a hemorrhage of policitcal support there."

The city attorney said yesterday he still felt "absolutely bitter" toward the federal government for filing the suit.

This bitterness has been apparent in the pretrial demands of the city. Philadelphia lawyers sought depositions from several Justice Department officials, including Bell who is now a private citizen. And they also asked the department to answer 50,000 questions about the case.

In the suit, the department said that 75 persons are shot by Philadelphia police each year and about 1,100 complaints are filed by civilians.

The government charged that Philadelphia police abused citizens' constitutional and civil rights by beating or shooting them on the streets without cause. The police then covered up the violations by intimidating witnesses and ignoring evidence such as a video tape of the beating of a handcuffed prisoner, the suit alleged.

Judge Ditter said the government simply had no right to seek to "advance the civil rights or third persons" without specific congressional authorization. He said Congress may find it appropriate to give the attorney general such authorization.

The problem of "standing" also has come up in the federal government's attempt to take action to force state governments to provide proper care for mental health patients, juveniles and prisoners.

A bill pending in Congress would specifically give the Justice Department such authority. It is being opposed by the association of states attorneys general on the same grounds -- fear of sweeping federal intervention in local issues -- that Ditter cited yesterday.