Early ast year, following the kidnaping and brutal murder of a U.S. drug agent by narcotics traffickers in Guadalajara, Mexico, U.S. Customs Commissioner William von Raab took the unusual step of ordering his agents along the southwest border to conduct elaborate searches of cars coming into the United States from Mexico.

Traffic backed up for miles. At some border stations, it took 12 hours to cross. Commerce between the United States and Mexico was seriously disrupted.

But by the time he ended the slow-down a week later, cooperation by Mexican law enforcement officials in the investigation of the murder of U.S. drug agent Enrique (Kiki) Camarena Salazar had increased dramatically, according to U.S. officials.

Von Raab, whose unilateral action reportedly infuriated the State Department, was told by his boss, Deputy Treasury Secretary Richard G. Darman, "The next time you decide to declare war or invade another country, please let us know."

Von Raab, known for his impatience with diplomatic niceties and slow-moving bureaucracy, is at the center of another controversy over his charges at a May 13 Senate hearing that "massive" drug-related corruption exists in the Mexican law enforcement establishment and that one Mexican governor owns four ranches where opium poppies and marijuana are grown.

In response to a question, von Raab also said he could not comment at a public hearing on whether one or more relatives of Mexican President Miguel de la Madrid are involved in drug trafficking.

Von Raab's statements about Mexico have triggered an unusual series of foreign policy statements and clarifications by the administration.

After the Mexican government lodged an official protest with the State Department, Attorney General Edwin Meese III called the Mexican attorney general and apologized for the testimony of von Raab and other administration officials at the hearing, telling him the testimony did not reflect the views of the president, the Justice Department or the U.S. government.

In a subsequent television appearance, Meese said he has full confidence in de la Madrid and that there is no evidence to back up the charges against the Mexican governor.

Even the Mexicans, however, say privately that they were stunned by Meese's sudden rush to their defense. One Mexican official said, "One day we're all black. One day we're all white. Where is the gray?"

Last Wednesday, the Treasury Department issued an ambiguous statement saying no knowledge "exists" that the Sonora Governor Rodolfo Feliz Valdes knew that any drugs were grown on his ranches. The statement also said drugs are grown on some ranches in his state.

Then, on Friday, the White House issued a statement of reassurance to the Mexicans:

"Drug-related corruption is a serious problem in Mexico, as it is in every drug-producing, transiting and consuming nation . . . . Mexico shares our concern about the corruption and also shares our belief that the problem is best countered by coordinated efforts to eliminate the evils associated with the drug trade."

Referring to "frank and productive" meetings between the two countries, the White House said the Mexican government is "committed" to the drug fight and that there will be increasing efforts to "improve U.S.-Mexican cooperation." The White House added that the Mexicans are prepared to prosecute "any persons involved in drug trafficking or corruption, regardless of their position in the government or society."

After the White House statement was released, a Treasury spokesman issued a clarification: "The White House statement was not in any way intended to be a repudiation of . . . von Raab. It is a simple restatement of our drug enforcement policy with respect to Mexico."

The conflict has created rumors that von Raab will be fired or demoted, and a rush to formulate a consistent policy on Mexico.

Alan C. Nelson, commissioner of the Immigration and Naturalization Service, publicly complained that von Raab's statements have damaged cooperation between the United States and Mexico in stemming the flow of illegal immigrants. Another official called von Raab a "loose cannon" and said he had damaged drug enforcement efforts between the United States and Mexico.

But administration officials, who spoke on the condition that their names not be used, say von Raab's job is not in jeopardy.

One senior White House official said he thinks that von Raab may have simply overstated the evidence he has received on drug corruption in Mexico: "He saw lots of smoke, and he yelled fire."

Despite the protests by Meese, federal law enforcement sources said von Raab based his charges on information obtained from multiple informants.

Other administration officials also have complained bitterly in recent months about drug-related corruption in Mexico, the top supplier of marijuana and heroin to the United States and a conduit for one-third of the cocaine coming into this country.

But von Raab was the first to make those complaints public.

Law enforcement sources at Customs and another federal agency said the allegations about relatives of de la Madrid come from informants inside Mexico, but have not been substantiated.

Von Raab, who has headed Customs since 1981, has gained a reputation for doing things his own way. His aggressive and brash style has won him many friends among federal law enforcement agents, but he is disliked by some higher-level officials who accuse him of being too hungry for media attention.

But even those who dislike von Raab say that he has improved the Customs Service, with expanded initiatives in drug interdiction, antipornography enforcement and a crackdown on illegal smuggling of U.S. technology to hostile countries.

Von Raab, a conservative who describes himself as "an enthusiastic supporter of President Reagan's philosophy of government," says he thinks that he has antagonized some people in Washington's power structure by "not playing the game."

"I'm less tolerant of the slowness of the bureaucracy. It's unnecessarily slow," von Raab said. He said he's been criticized for "failing to wait to thoroughly consult. But in some cases, action must be taken. I often advise, rather than consult. In Washington, consultation is sometimes another word for doing nothing."

Federal sources say they think that Meese contradicted von Raab's testimony because of concern that public criticism would endanger his behind-the-scenes efforts for Mexican cooperation in the drug war.

Meese and several other U.S. officials went to Cancun, Mexico, in April to discuss the drug problem with Mexican Attorney General Sergio Garcia Ramirez. It was the fourth law-enforcement summit between the two countries.

Federal sources said that von Raab refused to attend the April meeting because he had received intelligence that some of the Mexican participants were corrupt.

Justice Department spokesman Terry Eastland said of Meese's statements, "It's not an issue between Meese and von Raab. What the attorney general is trying to do is to put the position of the United States on Mexico into its fullest perspective."

Von Raab, who worked in the past as a corporate finance attorney, said that Customs is the "most enjoyable" job he's had. "I like law enforcement. I like it because the American people like it."