A Virginia judge ruled today that neither the state nor the U.S. Constitution blocks the prosecution of state Sen. Peter K. Babalas (D-Norfolk) on conflict-of-interest charges, ending a dispute over whether legislators are covered by the law.

Richmond Circuit Court Judge Thomas N. Nance dismissed without explanation arguments by Babalas' lawyers that their client's conduct as one of Virginia's 140 legislators was constitutionally protected.

After hearing two hours of debate, the judge announced: "I see no reason to prolong this. I feel very definite about my ruling. The motion is denied."

Nance's ruling, which cannot be immediately appealed, was hailed by state Attorney General Mary Sue Terry and others mindful of the bitter legislative battle that erupted earlier this year as some Virginia lawmakers tried to exempt themselves from provisions of the conflict law.

"This lays to rest, at least for the time being, any objections to the law," said Terry, who is recuperating from surgery. "Now that the constitutionality of the statute has been confirmed, as I fully expected that it would be, the stage is set for the trial on the merits of this case."

The ruling means that Babalas, 63, a lawyer and the fourth-ranking member of the Senate, must stand trial July 17 on charges of violating the conflict-of-interest law by helping to kill legislation that would have regulated the state's second-mortgage lenders. The bill was opposed by one of his legal clients, a company that paid Babalas' law firm more than $60,000, including $3,000 shortly after the mortgage legislation died.

Norfolk court records show that a company official noted on the invoice approving the latter payment: "This was one we agreed to pay after he stopped legislation in Richmond."

Babalas has said he is innocent of any wrongdoing and has waived his right to a jury trial. If convicted, he could be sentenced to a year in prison and fined $1,000 on each of two counts of the first-class misdemeanor.

Fairfax Commonwealth's Attorney Robert F. Horan Jr., who is serving as a special prosecutor in the case, argued today that the free speech and debate clause of the state Constitution protects legislators "from libel, slander, even bribery," but not from the conflict-of-interest act. He said the legislature has "the absolute power" to decide whether its members should be covered by the ethics provision, "and they chose to include themselves."

Robert D. McIlwaine III of Petersburg, Va., and Wayne Lustig, another Babalas lawyer, contended that only the General Assembly can discipline its members for actions taken in connection with their elective duties. McIlwaine, a former aide to several governors, argued that the courts could not "inquire into motives" behind a legislator's votes and that the Constitution's speech-and-debate clause shielded them from such questions.

Babalas, who is suffering from cancer, said his health is better now than in recent months. At times during the 1986 General Assembly session, where he has served since 1968, he appeared weak and in pain.

Today, rested by a vacation in Greece, a well-tanned Babalas appeared alert as he listened to the proceedings from the front row of the spectators gallery.

He had no comment on the ruling.

In January, the Senate Ethics Advisory Commission reported to the attorney general that it had found that Babalas "willfully" violated the conflict-of-interest law last year by casting a tie-breaking vote in committee that killed legislation that would have imposed restrictions on one of his clients, the now-bankrupt Landbank Equity Corp.