MEXICO CITY -- After seven months in jail on what were ruled to be fabricated charges, Mayor Salomon Mendoza Barajas returned a free man the other day to his little town of Agualilla.

The local farmers who had elected Mendoza celebrated his return with mariachi bands and congratulations that lasted into the night. What they saw as a triumph of good over evil, however, was seen here in the capital as a powerful symbol of the challenge facing President Carlos Salinas de Gortari in his effort to force Mexican authorities to respect human rights and the rule of law.

Despite repeated declarations by Salinas that official abuse will no longer be tolerated and despite his creation of a National Human Rights Commission to act as watchdog, many of Mexico's official institutions have yet to get the message. As a result, Mexicans' widespread lack of faith in the integrity of government -- even when it works properly -- has remained a formidable obstacle to Salinas's campaign for economic and political reform.

"Because society suffers daily aggression from the authorities in charge of protecting it, and in most cases the violation of law remains unpunished, it is only when the matter reaches national notoriety that it is possible to hope for a rectification of such outrages," commented the pro-government newspaper Excelsior.

Mendoza, 40, a rancher and father of six, was arrested May 6 by Federal Judicial Police and charged with promoting an ambush near Agualilla that left three federal narcotics agents dead and four others wounded. The federal police, Mexico's main anti-drug corps, said Mendoza helped organize the ambush in fulfillment of a campaign promise to protect marijuana and poppy farmers because of their contribution to the local economy.

The opposition Democratic Revolutionary Party (PRD), on whose ticket Mendoza was elected last December, immediately charged that the accusations against him were false and that his only crime was to have defeated the mayoral candidate of the ruling Institutional Revolutionary Party (PRI).

The PRD leadership in Mexico City took its complaint to the National Human Rights Commission, which Salinas set up two months after Mendoza's arrest in response to the outcry over his and other cases. In its first semiannual report this month, the commission said it had registered 1,343 complaints.

In the Agualillas dispute, the commission found Mendoza and three others had been unjustly arrested. Blaming local authorities, it recommended to Attorney General Enrique Alvarez del Castillo late last month that the four prisoners -- still untried -- be released and that the local prosecuting attorney be suspended.

Alvarez hesitated, demanding to see the commission's evidence. The commision president, Jorge Carpizo, quickly replied -- in a public letter that raised the political stakes.

Alvarez's reluctance was interpreted as an effort to stand by his anti-narcotics agents in the Federal Judicial Police, who man the front lines in an often-dangerous battle against drug smugglers.

It was only when Salinas publicly ordered Alvarez to follow the National Human Rights Commission recommendations that Mendoza was released. Mendoza was taken from his cell in Mexico City and flown in the middle of the night in a private plane to a small airfield near Agualilla. Two of his companions remained in prison despite the commission's recommendation.

"My government will not cover up abuses, torpidity, arbitrary actions, crimes or excesses by those who forget their responsibility of public service," Salinas declared on receiving the rights commission's report. "We will not tolerate that the struggle gainst narcotics trafficking be a pretext for abusing rights."

Back home, Mendoza said that his arrest and detention were acts of revenge carried out by Federal Judicial Police agents because during the mayoral campaign he had denounced "excesses by agents on the pretext of combating narcotics trafficking." He thanked Salinas and the commission.

The Michoacan state PRD leader, Tayde Aburto, complained, however, that Salinas should not have to intervene for justice to be done. "This means that it must be the president who says how and when things ought to happen," Aburto told reporters. "He wanted Salomon to get out and be free. If he had not wanted it, our friend would still be in jail."

Although the Agualilla episode attracted the most attention, several other recent incidents also have illustrated the difficulty Salinas faces in getting Mexico's institutions to function according to law and in persuading the Mexican public to have faith in its government.

For example, three persons were killed and as many as 50 injured last week in a clash between riot police and PRD activists protesting what they contend was government cheating in Nov. 11 state elections. The violence was the latest flare-up in a series of protests and roadblocks by opposition groups unwilling to accept the official count.