A federal appeals court said yesterday that police can legally board buses and question passengers at random to see whether they are carrying drugs, rejecting rulings by U.S. District Judges Stanley Sporkin and Gerhard Gesell that called such tactics unconstitutional.

The decision by the three-judge panel of the D.C. Circuit Court of Appeals concerns a police tactic increasingly common in the nation's war on drugs, one whose legality is being challenged before the U.S. Supreme Court.

In the searches, police board buses stopped along drug courier routes, such as from Miami to New York, and ask passengers for permission to go through their luggage. In separate rulings last January, Gesell and Sporkin said the practice is so intimidating in the close confines of a bus that it violates the Fourth Amendment's ban on unreasonable searches.

"It is . . . true that these bus encounters will expose significant numbers of law abiding passengers to random questioning by police," said yesterday's appeals court ruling, written by Judge James L. Buckley and concurred with by Judges Douglas H. Ginsburg and A. Raymond Randolph.

"The experience may well cause anxiety," Buckley's opinion continued. "There is, however, nothing unconstitutional about such encounters so long as the passengers' freedom to decline the interview and to go about their business has not been restrained" either by physical force or an intimidating show of police authority.

The same court has approved such police tactics aboard trains.

At least two other federal appeals courts, the 4th and the 11th Circuits, have approved such tactics on buses, as has the North Carolina state appeals court. But in the case pending before the U.S. Supreme Court, the Florida Supreme Court ruled last year that Broward County sheriff's deputies violated the Fourth Amendment when they boarded buses en route from Miami to Fort Lauderdale.

That opinion, as well as rulings earlier this year by Sporkin and Gesell, focused on the random nature of the questioning, the narrow quarters aboard the buses and the intimidation passengers might feel knowing that they could not leave without the risk of being left behind.

But yesterday's ruling drew a distinction between the cases in Washington and Florida, noting that Broward officers had worn badges and raid jackets, and one officer carried a pistol. The D.C. officers wore plain clothes and spoke to passengers in "conversational" tones.

The ruling described some language in Gesell's ruling as a "rhetorical flourish" that "has no basis in fact or law."