The cop looked Jimmy Salguero in the eyes and asked the question that would change his life.

"What's your name?" he said.

"Jimmy Salguero," said Jimmy Salguero.

The officer clicked a few keys on his computer keyboard.

"No, you're Jaime Garcia," he said.

"No I'm not," he insisted.

But it was no use. It was a Friday night, and the police would look good ending the week with a prize arrest. So a Guatemalan painter named Jimmy Salguero became Tijuana robber Jaime Garcia.

Telling the story later, Salguero, 32, said that he had been just another face in Tijuana, living in a Salvation Army shelter and trying to scheme his way across the border into the United States.

To pick up some cash, he had taken a job painting apartments. As he left work that evening in May 2000, the police stopped him and four Mexican painters and asked for their identification. The others produced ID cards. Salguero had none.

The officers whispered among themselves, then hauled him to the station, gave him a new name and sent him to La Mesa, one of the most notorious prisons in Latin America.

When Salguero protested, the cops punched him. They told him to shut up.

Behind bars, month after month, everyone called him Jaime.

Learning the Hard Way

The presumption of innocence and the right to see an attorney have long been written into Mexican law. But in practice those protections are often available only to those who can afford them.

President Vicente Fox, who took office nearly 16 months ago promising to spread democratic protections to all, has sought to end government abuse of individuals, and in particular to end a tradition of arbitrary, sloppy and corrupt police practices.

But injustice has deep roots in Mexico's justice system. There are still two legal systems in the country: one for those with money and connections, and one for the poor.

Salguero said he saw that up close on the ride to the police station, when one of the officers offered him the opportunity to buy his way out of trouble.

"I hear it costs about $1,500 to $2,000 to cross the border," the officer said slyly, Salguero recalled, referring to the going rate for a smuggler to guide immigrants into the United States. Salguero said he understood the deal being offered: Turn over your travel money and you can go home. But he had no cash.

"I just asked, 'How long will I be in this place?' " Salguero said. When the police officers realized they were squeezing an empty wallet, they turned cold. "They told me, 'It will be one to three months before the judge sees you.' "

As an undocumented migrant, Salguero was particularly vulnerable to police abuse. But he figured one person could surely help him: his older sister Ericka, a successful office clerk who lives in Rockville, Md.

He placed a collect phone call from the station. To his relief, she answered. He was certain that his sister, an 18-year resident of the United States with legal status there, could convince the Tijuana police that he was Guatemalan.

Salguero handed the phone to the officer on duty. "Please talk to my sister," he said.

The officer grabbed the phone and hung up.

"The line just cut off," his sister recalled. "They just didn't care who he was."

Still, she figured the police would correct their mistake: "You take someone's fingerprints and you find out who he is, or who he is not. How hard is that?"

But everything got harder.

'You Pay for Everything'

At first, Salguero didn't have a bed in prison. He needed cash for that. In La Mesa, as in many Mexican prisons, inmates pay for their accommodations. How well you sleep, eat and live depends on how much money you have. The divide between rich and poor so prevalent in Latin America is exaggerated inside that giant cage.

The night Salguero arrived in the spring of 2000, he was broke. In La Mesa, penniless can mean homeless. Night after night, he joined other poor inmates searching for a patch of hard ground on the basketball court. "There was no mattress, but somehow I got a blanket," Salguero said.

He soon learned that the thin blanket was one of the rare comforts provided free of charge. Even visiting rights and toilet paper would cost him.

From his concrete bed, Salguero could see the prison's version of luxury. The central section of the prison was filled with more than 400 small wooden houses, many with windows, balconies and stereos. The richer inmates live there.

The warden, Carlos Lugo Felix, said it was his understanding that the top price for one of the little houses was $1,500. But inmates and human rights advocates, including Cesar Barros Leal, a Brazilian law professor who visited La Mesa in December, said the black market price is as high as $30,000 for the finest homes. Middle-class prisoners sleep in relatively uncrowded cells, sharing one with perhaps six others. And the poorest sleep on the ground, Barros said.

Prison officials, trying to squeeze 5,500 inmates into a space built with a tiny budget for 2,800, allowed prisoners to build their own tiny houses years ago. Officials also allowed inmates to open kiosks, where they sell shrimp cocktails, hamburgers, tacos and burritos, and even rent videos. Inmates without cash do without.

Family is a kind of wealth here, too. By long-established custom in Mexico, prisons do not provide all of an inmate's food and supplies. An inmate's family is expected to make frequent visits and provide milk, meat, shampoo, jeans, shirts and medicine -- or the money to buy them.

Five days a week, Salguero watched a parade of more than 2,000 visitors enter La Mesa, lugging bags of supplies. Some men around him ate as well as they would at home, with enchiladas one day and fried chicken the next. But Salguero, with no family in Mexico, survived mainly on the gruel that was wheeled around the prison in vats.

All around him, families spent nights together: More than 500 wives and several hundred children spend at least a few nights a week inside the prison. But nobody visited Salguero, and no one threw anything over the wall for him at night in what is known as the "rain of objects."

With the guards paid off to look the other way, family members and friends tossed packages over the prison wall, often at times and places arranged on smuggled cell phones. Even cocaine and heroin stuffed inside soccer balls were thrown over the wall.

Salguero's thoughts were consumed by earning money. He needed to eat and to bribe guards. So he worked for other inmates who ran shoeshining and laundry businesses. And he carved wooden ships and picture frames and sold them to inmates and visitors.

"You pay for everything, even for water," he said. "To not have money in prison is like being out on the street without anything, with nothing to wear, no way to bathe yourself."

Inmates have even divided the territory inside the prison and set up what amounts to a system of tollbooths. When Salguero wanted to use a pay phone, he paid a gatekeeper about five cents in pesos. When he wanted to go into the visitors' area to try to talk to someone else's attorney, he forked over 20 cents.

What really drained his finances was the roll-call bribe. Every night, when the prisoners lined up to be counted, Salguero had to slip a guard 50 cents to be marked present on the attendance sheet. The days inmates spend in prison are recorded only when they are marked present; missing roll call means spending more time in prison. Guards have turned that into a big moneymaker. With more than 5,000 inmates in La Mesa, the total take from the shakedown could reach $2,500 or more a day.

Salguero paid his 50 cents nearly every night. Each time he did, Jaime Garcia got credit for another day in prison. Garcia, a convicted robber, was being sought for violating parole when Salguero was arrested. Now Salguero was serving out the remainder of Garcia's five-year term.

The injustice tore at him.

"I kept saying 'I want to see a judge or a lawyer,' " he said. "But nobody paid any attention to me."

"Other guys in jail said to me, 'Welcome to Mexico. That's how justice is.' "

'Invisible' Inmates

Salguero was not the only inmate serving time unjustly in Mexico. Human rights advocates and Mexican law enforcement officials said there have been many cases in which the wrong person has served time. Record-keeping has been so sloppy in prisons that officials have not even known the actual identities of inmates, or how many there are. Most prisons lack computerized databases of criminals' fingerprints or mug shots.

Some inmates who cannot afford a lawyer have been kept in prison beyond their sentences. And fugitives wanted for serious crimes have been discovered in prison serving time for petty offenses under assumed names.

A spokesman for the state police in Tijuana said he was unaware of Salguero's case and could not comment on it. Lugo, the warden, said that since he took over four months ago, he has established new procedures for registering and tracking inmates.

Salguero, a quiet, serious man, became withdrawn as time passed. On good days he dreamed of getting out and going back to school to learn automobile engineering. He wanted to build cars in the United States. He had only finished primary school in Puerto Barrios, his home town in Guatemala, 2,600 miles southeast of here.

He joined a Bible study group. His new friends got him off the ground and into a bunk. They paid for his new quarters and later, when he had money, they charged him a small fee each week. But they offered no hope.

"Even my brothers in the Christian group told me, 'You will be here for a long time.' I asked their visitors to help me but they didn't. Maybe they were scared or maybe they thought I was lying. Even a pastor told me I was paying for some debt I probably owed."

Christmas 2000 came and went.

"In my solitude, I would read the Bible," he said. "It was the only thing that consoled me. I felt invisible."

Dispatching Help

In Rockville, Ericka Salguero was frantic. With three small children, a new mortgage and a demanding job, she couldn't afford the 2,800-mile trip to Tijuana. Her pleas for help from the Guatemalan embassies in the United States and Mexico went nowhere. She arranged for a relative in Los Angeles to take the three-hour bus trip across the border to give Salguero money and new clothes. She was worried because when she had last spoken to her brother he had said: "Send money so I won't get beaten."

Ericka's mother-in-law arrived at La Mesa and waited nervously in the long visitors' line. The sight of police in bulletproof vests on the roof made her jittery; the smell of sewage and the picture of too many people behind chain-link fences made her sad.

When she finally arrived at the visitors' window, she asked to see Salguero -- using the name Jaime Garcia. She didn't know it, but she had just fallen into another moneymaking racket. The inmates who control the visitors' area charge a fee to find the inmate being summoned. And often, they charge the inmates for the "privilege" of seeing their visitors.

She didn't know that she was supposed to pay. Salguero never appeared. The inmates persuaded her to leave the package of clothes and money with them; they said they would deliver it. But Salguero said he never received the package or a message that a visitor had come.

"I wanted to scream. I wanted to say, 'I am not this person,' " he said. But complaints earned him a beating or, from the gentler guards, these words: "Then prove it."

Salguero couldn't. So he carved boats. When he had the extra pesos, he paid to get into the visitors' area to beg a few words with other inmates' visitors and attorneys. No one took him seriously.

Finally, one visitor gave him what turned out to be a golden brushoff. If you think you have a real gripe, call the human rights office in Tijuana, he said. The man passed him the phone number.

Salguero was excited about the new lead, but he needed $3 for a phone card to pursue it. He worked and saved, ate less, and finally bought a shiny new phone card.

It had been more than a year since his arrest.

He slipped the card into a phone, dialed the number, and Luis Hernandez picked up.

Finding a Way Out

Hernandez, a 22-year-old lawyer, had been working in the human rights office for four months. He was fielding five or six calls a day from prisoners in La Mesa, all with horror stories. On May 25, 2001, he visited Salguero. After they talked, Hernandez went to the court to see the file of Jaime Garcia.

"I was stunned," he said.

The man in the photo in Garcia's file was obviously not Salguero. He was older, taller and fatter. He had dark skin and curly hair, not the fair skin and straight hair of the man Hernandez had just visited. And he had drug needle marks running up and down his arms; Salguero did not.

Hernandez wrote to the judge in Garcia's case.

On June 5, as Jimmy Salguero neared the end of his 13th month in prison, he was summoned to the office of the deputy prison director.

"Are you Jaime Garcia?" the man asked.

"That is what they call me here. My real name is Jimmy Salguero. I am not Mexican."

The official, who, along with other top management has since left the prison, was quiet. He told him to wait. An hour later he returned and said only this: "I have good news. You are free to leave."

In minutes Salguero was on the street.

He raced to find Hernandez.

"Jimmy walked in and was in disbelief. His face was blank. No one told him why they released him," said the lawyer, reached in Spain, where he is now studying for a doctorate in human rights. He said he believed Salguero should sue the Tijuana police.

Ericka Salguero said he should receive an apology, at least. "They stole a year of his life, and it is not good enough to say, 'Bye, bye,' as if nothing happened," she said.

But Salguero's thoughts are already in Canada. They make cars there, too, and since Sept. 11, it's easier to go there than to the United States. He spends his days painting cars in Tijuana, saving his money.

Researcher Laurie Freeman contributed to this report.

Jimmy Salguero, a Guatemalan painter, spent more than a year in a Tijuana prison.Inmates sell hamburgers, tacos and shrimp cocktails in La Mesa to earn money, a resource as vital inside the prison as it is outside.Prisoners with money and connections pay top dollar to stay in houses, many of which have windows, balconies and stereos.Patches of hard ground replace mattresses for the inmates who cannot afford the prison's more comfortable housing arrangements.