Giovanni Hurtado Aviles was hurrying to his engineering class when he realized he didn't have the two pesos -- about 20 cents -- for the subway. When he tried to use somebody's else's pass to get on, he was caught and hauled to jail. "I made a mistake. I am really sorry. I won't do it again," Hurtado, 20, said he told the guard who nabbed him that January morning.

But the Mexican justice system, which often fails to punish serious criminals, zealously prosecutes the most minor of offenders. So the college student with no criminal record was denied bail and forced to mop floors for 12 hours a day for two months while he awaited trial.

"Our justice system is not just," said the Rev. Jose Luis Tellez, a Roman Catholic priest and lawyer who tries to get such prisoners freed. "The real criminals are at home in their houses while these people are in jail."

Mexico's courts and jails are clogged with people like Hurtado, people who stole a bicycle, bread, shampoo, subway fare. More than half of the 22,000 prisoners in Mexico City's jails are there for offenses so slight that human rights advocates -- and increasingly, city officials -- say they never should have been jailed in the first place.

According to recent testimony to the Mexican Congress by top law enforcement officials, well over 90 percent of serious crime goes unpunished. In a nation with one of the world's highest kidnapping rates, much drug-related bloodshed and a chilling level of violence on the streets of the capital, the prisons are choked with people who stole to eat. Tellez said a man who stole a Gansito, similar to a Twinkie, was released in November after spending three years in jail. He said another man who stole bread worth about $4 was sentenced to six years.

Public opinion polls show that Mexicans are fed up with their justice system. One of the key complaints is that it thunders down so hard on petty criminals. At every turn, the system is consumed with the smallest crimes: Poorly trained police focus on the easiest crimes to solve; corrupt officers, often paid to look the other way when there is more serious crime, have no such incentive to let small-time offenders go. Legislators under political pressure to combat rising crime rates have set tough minimum sentences for the smallest of robberies.

The result is that in many cases, as with Hurtado, the subway cheater, judges are forced by the law to hand down sentences they believe are unfair. Judges in Mexico have almost no discretionary authority. The Mexican legal system, based in 19th century Napoleonic Code, deliberately limits the role of judges. The theory is that legislators should craft penalties and judges should simply impose them.

The judge in Hurtado's case wanted to be lenient but said the law would not let him. He convicted Hurtado of "using a false document" -- showing a subway worker's pass that Hurtado said he had found on the floor. That is the equivalent of a felony, a crime considered too grave to warrant bail, punishable by a minimum of four years in prison. Behind bars, Hurtado vomited from nervousness. He fell far behind on his class work and lost wages from an after-school job.

"What my son did wasn't a crime; it was a mistake," said his mother, Laura Aviles Rodriguez. "Who would call this justice?"

A Well-Connected Defendant

Behind the high brick walls of a Mexico City development called Poinsettia, amid gardens of purple bougainvillea and expensive SUVs parked in a row on the cobblestones, Oscar Espinosa Villareal lives the life of an accused embezzler with means.

Espinosa, Mexico City's mayor from 1994 to 1997, is accused of illegally diverting $45 million that was never accounted for during his term. When a judge issued a warrant for his arrest in August 2000, he did what many wealthy Mexicans do in the same situation: He bought a plane ticket and fled the country. His top aide is still a fugitive.

Espinosa flew to Canada and then Nicaragua, where he was caught. He maintains he has done nothing illegal and that he is the victim of a revenge campaign by his political enemies. He fought extradition on grounds that the case against him amounted to political persecution, but the Nicaraguans sent him home.

Espinosa is part of the well-connected old guard of the Institutional Revolutionary Party, or PRI, which ran Mexico from 1929 to 2000. He served as campaign finance manager for his old friend, Ernesto Zedillo, who became president and rewarded Espinosa with the mayor's job, a presidentially appointed position until 1997. When Espinosa's term expired, Zedillo appointed him to serve as national tourism minister from 1997 to 2000.

When Espinosa arrived back in Mexico on a federal police jet from Nicaragua, his wealth and connections kicked in. He hired one of Mexico's leading lawyers, who persuaded a federal judge to issue an order forbidding his arrest and detention, allowing him to remain free pending trial. Espinosa was ordered to post bail of about $400,000. He paid about $12,000 in cash, put up his house to cover the balance, and then went home.

Based on Mexico's long history of elites beating criminal charges, few here believe Espinosa will ever be convicted. It is a story Mexicans know well: Accused of stealing $45 million, Espinosa sleeps in his own bed at night, while Hurtado, who sneaked a 20-cent subway ride, was forced to sleep on a jailhouse cot for months awaiting trial.

Francisco Garduno, the former head of prisons for Mexico City, has given speeches to inmates citing Espinosa as an example of how those accused of major crimes get better treatment than minor offenders, who are invariably poor. "The road to justice opens up wide for them," Garduno said. "But for the poor it is very narrow."

Behind Bars for Lack of Funds

Far from Espinosa's hillside retreat, in a rough neighborhood in the southeast side of the city, Tellez, the Catholic priest, runs a church program to get minor offenders out of jail.

Frustrated with the government's approach to petty criminals, the church has quietly begun its own effort to help. The church pays fines and bail for thousands of nonviolent petty criminals, most of them first offenders. People convicted of a crime are often allowed to choose jail time or a fine. Tellez said he has handled cases of many who could have avoided jail or served less time by paying a fine of as little as $25.

"It absolutely is unfair that money determines freedom," Tellez said.

Church lawyers last year reviewed the files of 11,000 prisoners in Mexico City jails, half the city's inmates. They concluded that at least 4,000 were minor offenders stuck behind bars because they could not afford to pay fines or bail. In all, the church has arranged for the release of 4,100 people.

A private foundation, supported by Telefonos de Mexico, or Telmex, the country's largest telephone company, has paid for the release of 20,000 minor offenders in the last five years.

The foundation spokesman, Mario Cobo Trujillo, said cases have included a man, charged with injuring another man in a fight, who spent eight months in jail awaiting trial until the foundation paid his $25 bail. Cobo said another man spent more than 18 months awaiting trial for want of $100 for bail.

Mexico's culture of official secrecy has kept the extent of the problem hidden. Until recently all prison records in Mexico were considered confidential, and they are still difficult to obtain. That has made it hard to document how the system has been primarily focused on the least significant crimes.

But now that church lawyers and human rights workers are being given access, members of the public are getting their first glimpses at the make-up of the prison population. What they are finding has sparked a drive to substitute restitution and community service for prison time for minor offenders.

Laws Limit Judges' Authority

Hurtado's case was handled by Judge Eduardo Mata, a chain-smoking former prosecutor. "Ever since I got this case, I thought it was a shame," Mata said in an interview in his glass-walled courthouse office. "He just did something stupid. But there was nothing I could do."

Mata, who has been a judge for nine years, said the case was a frustrating reminder of the strict limits on his authority and how minor offenders end up behind bars.

"I think we need reforms that give judges more freedom," he said. "We don't have the flexibility we need."

A Mexican judge's main task is to read files and issue a sentence that falls between the minimum and maximum penalty established in the criminal codes. In Mexico there are no jury trials. And in many cases, the judge never even sees the defendant, issuing his decision based on the written record. Limiting the judge's authority is meant to limit bribery and other corruption on the bench.

"Our hands are tied by the law," Mata said. "We can't do anything if we think the minimum sentence is unfair."

Mata recalled a case in which a young man stole a bag of bread from a woman in a Mexico City market. Police grabbed him immediately, and they and the thief discovered that the woman had also stuffed 40,000 pesos -- about $4,500 -- into the bag after a trip to the bank.

Mata said he wanted to sentence the man based on his intention, which he said was to steal a loaf of bread. But because the man had committed a major robbery, even unwittingly, Mata said, the law required him to sentence him to several years in prison.

In Hurtado's case, Mata said the best he could do was issue the minimum sentence for his crime: four years in prison and a fine of about $950. Mata said he then used the only wiggle room the law allowed him, letting Hurtado substitute an additional fine of about $560 for his prison time.

"He didn't damage society in any way," Mata said. "I didn't like the sentence I had to give him. Our laws aren't that fair."

Gaunt and defeated, Hurtado walked out of jail on March 13 after 63 days behind bars.

A former employer lent him more than $1,500 to pay his fines, allowing him to avoid a prison sentence that would have kept him locked up until 2006. That makes him luckier than most. But it will take every peso of his earnings -- and his mother's -- for more than a year to pay back his debt.

Former prison chief Garduno, who now runs the city's transportation department, is outraged at how the system treated Hurtado and how it punishes the wrong people. So he gave him a city job to help him pay off his debts.

"I am trying to repair the damage done to our society," Garduno said. "I am trying to rectify something that has happened to thousands of people in Mexico."

This story is one of a series examining Mexico's justice system. For previous stories see Researcher Laurie Freeman in Mexico City contributed to this report.

Laura Aviles Rodriguez, whose son, Giovanni Hurtado Aviles, was jailed for two months after trying to evade a 20-cent subway fare, stands outside the Reclusorio Norte prison.Giovanni Hurtado Aviles watches his court hearing from behind bars in Mexico City. There are no jury trials in Mexico.