SAN FRANCISCO -- Clad in combat boots, tight jeans and black jackets, a gang of skinheads cornered the university student outside a Moscow subway station three summers ago, shouted racist slurs and beat him up.

The former Moscow student testified about the violence last month in the downtown San Francisco courtroom of federal Judge Dana Leigh Marks. He spoke for more than two hours about nationalist thugs and corrupt police, and the judge listened carefully, probing for a detailed account of his alleged persecution.

The testimony was among more than 10,000 pleas for political asylum that Marks and 14 other immigration judges in the Northern California court have heard, and ruled on, since 2008.

A tall, lanky 22-year-old with Central Asian features, the asylum-seeker was Russian by birth and nationality, but he hailed from a Buddhist region on the shores of the Caspian Sea, far from the Russian capital. Some Moscow residents looked at him and saw a foreigner who did not belong.

"The society in Russia has turned against the people who came there who are not Russian," he testified. "There is a strong xenophobia there now."

Asylum-seekers lob allegations of persecution against foreign powers almost every day in San Francisco's immigration court, one of the nation's busiest and most backlogged. The court covers a populous Northern California region stretching from Bakersfield to the Oregon border, but its caseload involves political, ethnic and religious conflicts that span the globe.

Those accused of being the oppressors -- dictators, armies, corrupt police, guerrillas, paramilitaries, mobs and fanatical groups -- never hear the allegations against them. But by granting a person political asylum in the United States, a judge has ruled that the stories are believable and that the immigrant has a credible fear of persecution.

Time-consuming cases

Housed in two nondescript high-rise buildings on Montgomery and Sansome streets, the region's immigration courts are well-known to immigrants and their lawyers, but barely noticeable to the crowds of suited Financial District workers who hurry past them. Some immigrants arrive at the courts in shackles after being detained by immigration agents. Others arrive on their own after getting a summons in the mail.

Immigrants, both asylum-seekers and otherwise, wait an average of 441 days before their cases are resolved in the San Francisco court, the longest wait after Los Angeles, according to court records collected and analyzed by Transactional Records Access Clearinghouse, a New York-based research group that has sought to bring more transparency to the courts.

For judges, the load can be overwhelming. Just days before the Dec. 17 hearing for the Russian's asylum claim, Marks was presiding over her regular packed calendar of cases in a standing room only courtroom.

"It's like M.A.S.H., and you're doing triage," said Marks, a 1987 appointee who is the San Francisco court's longest-serving immigration judge.

Most of the cases were continued to another date. Marks told some immigrants that they would have to come back in May 2013, the earliest available month on her calendar.

Still, some lawyers say San Francisco's court is more efficient today than it has been. By the end of the year, the number of judges expanded to 18 from 15.

"It's probably as good as it's ever been, in my experience," said immigration lawyer Robert Jobe. "It's dramatically improved over the years. When I started doing this over 20 years ago there were immigration judges literally doing asylum cases every half-hour."

Asylum cases occupy just part of an immigration judge's caseload, but lawyers and judges say the cases are usually the most complicated and time-consuming. The average San Francisco immigration judge decides more than 200 of them annually, according to records.

For many asylum-seekers, the long wait -- and the cost of getting a lawyer's help -- is worth the path to a green card. For others, the wait merely delays an unwanted return to the place they left. Judges in the San Francisco immigration court denied about 60 percent of the asylum requests they heard in the past three years, sending thousands of immigrants back to countries they sought to flee.

One San Francisco judge denied 92 percent of the asylum claims that came before him between 2008 and 2010. Marks denied 40 percent of cases during that period.

Nationwide, the number of asylum-seekers has dropped, though the number of applicants who win their cases has grown. The New York clearinghouse researchers attribute that to another trend -- more asylum-seekers are getting lawyers.

Deciding factors

Each asylum case -- whether it leads to a green card or deportation -- can require hours of detailed testimony. The stakes are high and the stories sometimes painful to tell -- and hard to prove.

The judge can make a big difference in the ruling. The clearinghouse found vast disparities in denial and acceptance rates among judges and variations among regions, though those discrepancies have decreased since the reports first came out.

"The immigration courts really didn't like it when we released it," said David Burnham, co-director of the research group. "But they seem to be dealing with some of the disparities. We speculate that it's the ability of judges to look at themselves and what their colleagues are doing."

Country of origin may make the biggest difference. San Francisco's court sees the highest number of Indian asylum-seekers, most of whom win their cases. Lawyers say a precedent-setting case in the Northern California courts in the 1990s made it easier for Sikhs to make a case for political asylum in the United States, but courts in other parts of the country did not follow suit.

Most Salvadoran and Mexican immigrants who seek asylum are denied, in part because the drug cartel and gang violence that threatens them is not classified as political persecution. In contrast, the majority of applicants from places such as Iraq, Eritrea, Myanmar and the former Soviet Union win their cases.

When he arrived in Marks' ninth-floor courtroom on the morning of Dec. 17, the Russian asylum-seeker, clad in a formal suit, said he felt a little nervous.

He welcomed a reporter at his asylum hearing -- judges typically close such hearings to the public -- but asked that his name not be published for fear of reprisal against relatives in Russia.

Marks listened attentively to the young man's testimony and interjected questions when she wanted more information.

"I know it may be offensive, but I'd like you to tell me exactly the insults they used," the judge said.

The skinheads called him uzkoglaziy, which means slant-eyed, and churka, a derogatory term for Russia's ethnic minorities.

He said he was born and raised in Russia's southwestern republic of Kalmykia, a Buddhist-majority region that has been under Russian control for centuries. Like many who grew up in the multiethnic periphery of Russia's vast federation, he had migrated to the Slavic-dominated capital seeking opportunity -- in his case, a quality university education. He found discrimination instead.

The college student said the subway station beating in Moscow was one of several times he was slurred and attacked because of his ethnicity, he said at the hearing. Sometimes skinheads were the perpetrators. Other times, it was law enforcement. After one attack, police arrived at the scene, detained everyone and blamed a group of bystanders who tried to protect him -- not the nationalist skinheads who struck him -- for provoking the violence.

"Police in Russia are turned against the anti-fascists. They catch them, they arrest them, they put them in prison -- and they support the skinheads," he told the judge. "They said I'm lying, that it was the anti-fascists who attacked. They said, 'Because of people like you, uzkoglaziy, our Russian guys are fighting.' "

A government attorney from Immigration and Customs Enforcement cross-examined him, asking him to verify places and dates. Clerks worked silently on the sidelines. A big, yellow clock ticked loudly on the wall above the Russian's head.

Unrest at home

On the same week he was in court, newspapers reported that Moscow was experiencing its worst race riots in years. Crowds declared "Russia is for Russians!" and "Moscow is for Muscovites!" and blamed ethnic minorities for a street fight that led to a soccer fan's death, according to the reports. Weary of the wars between Russian soldiers and separatists in the restive Caucasus region and the terrorism that has its roots in those conflicts, some urban Russians have lashed out against the minorities, according to international reports.

The San Francisco asylum-seeker, however, didn't have to worry about that anymore.

The hearing began at 9 and ended at 11:16 a.m., when Marks announced she was granting him political asylum. She determined, based on his testimony and a ream of documents, including news reports, that he had a well-founded fear of persecution in his homeland. It was one of more than 600 asylum cases the judge has handled since 2008, but for the man on the other side of the bench, it was a life-changing moment. The ruling means he can permanently reside in the United States.

"Thank you very much," the man said, smiling for the first time since he entered the courtroom.