President Clinton yesterday directed federal law enforcement agencies to collect information on the race, ethnicity and sex of people they detain for questioning, a move aimed at developing data needed to determine whether they unfairly target minorities.

Speaking at a Justice Department conference, Clinton said he had ordered the collection of detailed data on whom federal law enforcement agencies are detaining and why. The Justice Department then will analyze the information to determine whether the agencies engage in racial profiling, the practice of targeting people for police examination based on their race or ethnicity.

"Racial profiling is in fact the opposite of good police work, where actions are based on hard facts, not stereotypes," Clinton said. "It is wrong, it is destructive, and it must stop."

The presidential order comes amid mounting criticism by civil rights leaders of aggressive police tactics and a day after the conviction of a second New York City police officer in the brutal beating of Haitian immigrant Abner Louima. Although crime is down across the country, a broad national report released by the Justice Department last week showed that minorities continue to be significantly less satisfied with local law enforcement than whites are.

Clinton's directive marks the first time he has waded so decisively into the issue of racial profiling, which is the subject of sharp disagreement between civil rights advocates and law enforcement authorities. Whereas civil rights leaders have long complained about racial profiling and cite a thick file of mostly anecdotal evidence to support their case, law enforcement officials typically dismiss such complaints as more perception than fact.

Clinton said developing more detailed information about police stops can bridge that gap. "We all have an obligation to move beyond anecdotes to find out who is being stopped and why," he said.

The presidential order applies only to federal law enforcement agencies, which typically come into contact with the public far less frequently than do state and local police forces. But that situation is different in the Washington area, which with its broad range of federal facilities, from parkland to government offices, is served by some two dozen law enforcement agencies, many of them federal.

Already, some federal agencies are collecting the kind of data the presidential order requires. Last month, the U.S. Customs Service began systematically collecting racial and ethnic data of the people searched by its agents, after widespread allegations of racial profiling. The agency has about a dozen lawsuits pending, most of them alleging that it unfairly targets blacks and other minorities for searches.

"We needed this information in order for us to get a handle on those complaints," said Customs Commissioner Raymond W. Kelly. "Having the data is fundamental to an examination of our practices."

In his remarks, Clinton also called on state and local police forces, which operate outside federal jurisdiction, to begin collecting similar data. Local law enforcement officials generally oppose such data collection as a waste of police resources and a hindrance to fighting crime.

"I don't know what purpose is going to be served by law enforcement officials recording your race, your sex, and your age," said Robert Scully, president of the National Association of Police Organizations, an umbrella group for 4,000 police unions. "If there is a perceived problem . . . there are mechanisms in place to deal with it."

Although racial data on police stops and searches are sparse, several regional studies have seemed to support allegations of racial profiling.

In Maryland, for example, where state police are under court order to collect information on the race of motorists stopped by troopers, African American drivers accounted for 27 percent of the police stops last year along a stretch of Interstate 95 northeast of Baltimore, even though they made up only an estimated 17 percent of the motorists.

In addition, 44 percent of the 402 vehicles searched along that stretch of roadway last year were driven by African Americans. Maryland state police officials defended those numbers, saying that troopers only search cars with probable cause and noting that 40 percent of the vehicles searched were found to be carrying drug-related contraband. Moreover, they said a third of the troopers assigned to patrol that stretch of highway are African Americans.

Ira Glasser, executive director of the American Civil Liberties Union, sent a letter to Janet Reno last week calling for strong federal action to address complaints of racial profiling. Yesterday, he called Clinton's order an important first step.

"He has done as much as he can without legislation," Glasser said. "I believe keeping the records will be to some degree its own remedy."

CAPTION: Joined by Attorney General Janet Reno, President Clinton speaks before chairing a discussion on relations between police and communities.