A divided federal appeals court panel here yesterday struck down the statute establishing independent counsels to investigate wrongdoing by high-ranking government officials, saying that the law "seriously weakens constitutional structures that serve to protect individual liberty."

The long-awaited 2-to-1 decision could jeopardize last month's perjury conviction of former White House aide Michael K. Deaver, whose lawyers filed a motion yesterday asking that his conviction be set aside and his case dismissed. Deaver's sentencing is set for Feb. 25.

However, the ruling -- likely to be reviewed by the Supreme Court -- is expected to have little or no effect on Iran-contra independent counsel Lawrence E. Walsh or James C. McKay, who is prosecuting former White House political director Lyn Nofziger on conflict-of-interest charges and is investigating Attorney General Edwin Meese III.

Walsh and McKay accepted back-up appointments from the Justice Department in case the law was overturned.

"Because of the attorney general's parallel appointment, we do not believe this ruling will affect the continuity of our investigation," Walsh said in a statement.

The Supreme Court Tuesday refused to review a separate appeals court decision upholding the constitutionality of Walsh's parallel appointment in a challenge brought by Marine Lt. Col. Oliver L. North.

U.S. District Court Judge Thomas A. Flannery, presiding over Nofziger's conflict-of-interest trial, refused to suspend the proceeding while yesterday's appeals court decision is reviewed.

Nofziger's lawyers have argued that McKay did not have power to subpoena documents during a one-month period between his court appointment and the Justice Department's parallel apointment.

The appeals court majority struck down the law on the grounds that having a special court appoint and supervise independent counsels, and severely restricting the president's power to remove the prosecutors "so deeply invades the president's executive prerogatives and responsibilities and so jeopardizes individual liberty as to be unconstitutional."

Judge Laurence H. Silberman wrote the 88-page decision and was joined by Judge Stephen F. Williams. Both are appointees of President Reagan.

Judge Ruth Bader Ginsburg, named to the court by President Jimmy Carter, issued a 40-page dissent concluding that the law "effects no intolerably sweeping displacement of executive branch authority."

The decision represented a major victory for the Justice Department, which joined in challenging the constitutionality of the independent counsel provisions of the 1978 Ethics in Government Act. U.S. District Court Judge Aubrey E. Robinson Jr. found the statute constitutional in July.

Whitney North Seymour Jr., the prosecutor in Deaver's case, and Alexia Morrison, whose probe of former Justice Department official Theodore B. Olson prompted yesterday's ruling, refused parallel Justice Department appointments.

Seymour was unavailable for comment yesterday.

Morrison told United Press International that she and her attorneys will carefully study the panel's ruling "to determine how to proceed" and that they "continue to believe the law is constitutional and essential."

Morrison's investigation involves whether Olson, a former assistant attorney general, lied to a congressional subcommittee investigating the Environmental Protection Agency "Superfund" scandal.

Olson and two other former high-ranking officials subpoenaed in Morrison's probe filed the original suit challenging the counsel statute.

Justice Department spokesman Terry Eastland, speaking for Deputy Attorney General Arnold I. Burns, who is handling the case because Meese has removed himself from matters involving independent counsels while he is under investigation, hailed the ruling, which largely accepted the arguments put forward by the Justice Department.

"Today's decision and the action of the Supreme Court this week in the North litigation demonstrate the wisdom of the department's independent efforts to establish a constitutional mechanism through which allegations of misconduct by government officials can be investigated," he said.

Congress voted overwhelmingly last year to extend for five years the system of having court-appointed independent counsels investigate allegations of wrongdoing by high-ranking government officials.

Reagan signed the legislation last month despite what he said were "very strong doubts about its constitutionality," citing the pending appeals court case.

Although the new law was not directly at issue in yesterday's ruling, experts familiar with the statute said the appeals court's reasoning seems to mean the new law is unconstitutional as well.

Sen. Carl M. Levin (D-Mich.), one of the chief Senate sponsors of the new law, said it provided "an essential mechanism" for investigating government officials and predicted that the the Supreme Court will overturn decision.

"This country cannot afford to return to the chaos of Watergate, when the president exercised the power to appoint and fire at will the prosecutors investigating his associates," Levin said.

Although the independent counsel law was designed to avoid any potential for conflict of interest in having the executive branch investigate wrongdoing by its own high-ranking officials, Silberman said, "The conflict of interest, such as it is, is found in the Constitution itself . . . . Congressional desire for more effective administration of the criminal law when high governmental officials are implicated cannot justify departure from a constitutional plan carefully calibrated to balance the need for law enforcement against concerns for individual liberty."

The majority also said the law violated the Constitution's Appointments Clause, which provides for the president to nominate officers, and improperly involved judges in prosecutorial matters, "undermin{ing} the status of the judiciary as a neutral forum" to decide disputes. In her dissent, Ginsburg said the law "is a measure faithful to the eighteenth century blueprint, yet fitting for our time," designed to maintain the separation of powers by serving as "a control against abuse of executive branch power."

She said the law "neither impermissibly transfers an executive function to another branch nor orders an undue displacement of executive prerogatives." If Morrison, whose time to bring charges against Olson may be running out because of five-year statute of limitations on his perjury charge expires in March, seeks Supreme Court review, it is unclear whether the case could be heard this term. The court has nearly filled its docket and has only only four hours of argument time remaining.

If the court is to consider this case before next fall, it must do so on an expedited basis.

Generally, the court will hear cases on an expedited basis if the matter involved is of great public importance and cannot tolerate a delay.

Staff writer Al Kamen contributed to this report.