A federal judge ruled on Friday that Secret Service agents may be compelled to testify about President Clinton's relationship with a former White House intern, rejecting administration arguments that the agents were covered by a novel privilege required to protect presidents from assassins.

After the decision, President Clinton, who had largely recused himself from the debate over Secret Service privilege, told reporters that testimony by agents could have a "chilling effect" on relations between presidents and those who guard them.The judge, Norma Holloway Johnson, swatted aside that reasoning. The Justice Department had argued that, if agents could testify, presidents would put themselves in danger by putting their guards out of sight or earshot.

In a curt opinion, the judge found that what the Secret Service called a "protective function privilege" had no basis in the Constitution, congressional intent, or federal or state history - or even, she suggested, in common sense.

"It is not at all clear that a president would push Secret Service protection away if he were acting legally or even if he were engaged in personally embarrassing acts," she wrote. "Such actions are extremely unlikely to become the subject of a grand jury in-vestiga-tion."

She added: "The president has a very strong interest in protecting his own physical safety."

The decision was another procedural victory for the Whitewater independent counsel, Kenneth Starr, who is seeking to learn what Secret Service officials know about Clinton's relationship with Monica Lewinsky, the former intern and Defense Department worker.

Starr has sought testimony from John Kelleher, the chief counsel of the Secret Service, and from two uniformed officers, Gary Byrne and Brian Henderson. Starr wants to know whether Byrne or Henderson discussed Lewinsky with Kelleher.

Starr is investigating whether the president had an affair with Lewinsky and sought to cover it up. Clinton has denied the charges, and Lewinsky has sworn that she had no sexual relationship with him.

One administration official said Friday evening that the Justice Department was almost certain to appeal the ruling. But Bert Brandenburg, a Justice Department spokesman, said that a decision on an appeal would probably not be made for several days.

That decision would probably involve both Solicitor General Seth Waxman and Attorney General Janet Reno.

"Any action that could distance the Secret Service from the president increases the danger to his life and that of future presidents," Brandenburg said.