The Supreme Court ruled yesterday that evidence illegally seized by police can be used to prove that a criminal defendant lied on the witness stand.

The 5-to-4 ruling continues a trend on the Burger court to limit application of the "exclusionary rule," which bars the use of illegally obtained evidence to prove a defendant's guilt. Liberal consider the controversial rule a crucial deterrent to police abuse.

The court ruled yesterday, however, that to exclude evidence in this case would impair "the integrity of the fact-finding goals of the criminal trial." In a dissent, Justice William Brennan wrote that the decision was "yet another element in the trend to depreciate the constitutional protections guaranteed the criminally accused."

The case involved a Fort Wayne, Ind., lawyer, J. Lee Havens, convicted of cocaine-smuggling. Havens' luggage was seized and searched without a warrant as he arrived on a flight from Lima, Peru, to Miami.

While prosecutors did not use the evidence directly to prove the smuggling charge, they did use it to challenge his honesty when he was cross-examined during the trial. A lower court reversed the conviction.

Justice Byron White wrote the majority opinion, and was joined by Chief Justice Warren Burger and Justices Harry Blackmum, Lewis Powell and William Rehnquist. In overturning the lower court, White wrote: ". . . Arriving at the truth is a fundamental goal of our legal system. We have repeatedly insisted that when defendants testify, they must testify truthfully or suffer the consequences" and Havens' "privilege against self-incrimination does not shield him from proper questioning."

The justices said that past Supreme Court decisions have already established that illegally obtained evidence can be used in similar circumstances, if not to specifically prove guilt.

The dissenters, Justices Brennan, Thurgood Marshall, Potter Stewart and John Paul Stevens, said the previous cases were different enough to make yesterday's ruling "an unwarranted departure" from the past in that it significantly narrows the exclusionary rule.

In other decisions yesterday:

A divided court declined to rule unconstitutional the Drug Enforcement Administration's five-year-old program of screening arriving airport passengers for drug violations using a "drug courier profile."

Agents observe passengers for certain traits and suspicious activities under the program and then, if it seems indicated, question a passenger about possible drug trafficking.

Sylvia Mendenhall, the defendant in yesterday's case, was questioned because she appeared nervous, claimed no luggage and abruptly changed airplanes in Detroit for a connecting flight to Pittsburgh after she got off a flight from Los Angeles. Two bags of heroin were eventually found in her undergarments and she was convicted.

The court voted, 5 to 4, to reinstate her conviction, which had been overturned by a lower court, saying that she had not been involuntarily detained as a result of the profile, she could have walked away from the agents and that, therefore, her rights were not violated.

The main opinion, written by Stewart, did not specifically address the drug courier profile's legality, which had been challenged by Mendenhall.

In a unanimous decision, the court ruled that people who sue public officials for violating rights do not have to prove that the officials acted in bad faith. Many officials are immune from suits if they acted in "good faith," but the court ruled yesterday that it is up to the official to prove the "good faith." The case involved a Puerto Rican policeman, Carlos Rivera Gomez, who sued the Puerto Rican police superintendent after being fired without a hearing.

In another case from Puerto Rico, the court ruled, 6 to 3, that citizens of the commonwealth are not necessarily entitled to the same welfare benefits given citizens of states. Congress placed Puerto Rico on a footing different from the states without an obligation to pay the same taxes as state residents, the court said. Therefore, the benefits need not be the same.