LOS ANGELES -- One day, Roger Mahony, then about 12, was working in his father's poultry processing plant in the San Fernando Valley when law enforcement agents searching for illegal immigrants raided the facility.

"I will never forget them bursting through the doors," Mahony recalled. "I was terrified by it. And I thought, 'These poor people; they're here making a living supporting their families.' . . . It had a very deep impact on me throughout the years." One of his father's workers was taken away.

Now Cardinal Roger Mahony, he leads the Archdiocese of Los Angeles. It is the largest Roman Catholic diocese in the country, and Mahony has recently placed himself and the church in the middle of the national debate on immigration.

On March 1, during Ash Wednesday Mass, the Hollywood-born clergyman attacked a House bill that would turn most people and institutions that aid illegal immigrants into felons. Calling it "blameful, vicious" legislation, Mahony vowed a campaign of civil disobedience in the archdiocese's 288 parishes if it becomes law.

Protest organizers and participants credited Mahony's fire from the pulpit -- and the educational campaign he initiated in January throughout his archdiocese -- with playing a critical role in organizing opposition. They say his efforts helped prompt half a million people, including many illegal immigrants, to feel safe enough participate in one of the biggest demonstrations ever in downtown Los Angeles on March 25, calling for a more liberal immigration bill.

Los Angeles was one of more than a dozen cities in which demonstrators coursed through the streets. Earlier last week, a Senate committee approved an alternative measure with a guest-worker program that would help many illegal immigrants eventually win permanent residency or even U.S. citizenship. "I think this is a good beginning," Mahony said in an interview, "but we are not stopping now."

He is tall and stoop-shouldered. His face fixed in an almost permanent smile, Mahony became archbishop in 1985. Much of his religious career has been devoted to Hispanic migrants and the civic activism he countenanced last month.

In the early 1960s, Mahony attended a seminary a stone's throw from citrus farms in the San Fernando Valley. He honed his Spanish by practicing with fruit pickers brought to the United States on the "bracero" guest-worker program that ended in 1964 in part because the workers were ruthlessly exploited. Mahony recalled the paychecks of the laborers. Seven days of work for $11.08 with a laundry list of deductions -- for the rent of a cot, a blanket, towels, silverware, meals.

A year after Mahony became a priest in Fresno in 1964, Filipino and Mexican farm workers launched the Delano Grape Strike, leading to the formation of the United Farm Workers and elevating labor leader Cesar Chavez to international prominence.

At the time, no government agency claimed jurisdiction over agricultural workers, so the church stepped in. From the start of the strike, Mahony worked on the Bishop's Committee on Farm Labor and mediated between strikers and farm owners. In 1975, then-Gov. Edmund G. "Jerry" Brown Jr. appointed Mahony as the first chairman of the state Agricultural Labor Relations Board -- a recognition of the unique role that Mahony and the church had played in fighting for the rights of migrant workers.

"For many, many years he has been totally involved in so many ways trying to give attention to the Hispanic community," said the Rev. Anastasio "Tacho" Rivera, who ran the Spanish ministry section of the archdiocese for years. When Mahony was appointed archbishop two decades ago, Rivera recalled that there were two priests in the archdiocese's Spanish office. Today, with Latinos estimated to make up about three-fourths of the archdiocese's 5 million members, there are more than 20 priests.

"L.A. is the second-largest concentration of Mexicans next to Mexico City. . . . this has to be an important issue for him," said the Rev. Thomas J. Reese, a fellow at the Woodstock Theological Center at Georgetown University. "This is the church at its best, out to defend the defenseless. And they're Catholic."

Religious observers say that for the church at large and Mahony in particular, the immigration debate provides an opportunity to stress values that have recently received little attention. For the past few years, Reese said, some in the church's leadership have been "appalled" at how Republican politicians used opposition to abortion to capture the Catholic vote in 2002 and 2004. By putting itself squarely on the liberal side of the immigration debate, Reese said, the church's hierarchy can "go on the record and show that the Roman Catholic Church is not in the back pocket of the Republican Party."

Mahony seemed to agree when, in the interview, he married the church's position on immigrant rights to its antiabortion stance.

"People unfortunately always want to place the pro-life agenda in two boxes: abortion and euthanasia," he said, speaking of two issues opposed by most Republicans. "But our pro-life agenda encompasses a broad spectrum of issues, and [immigration] is one of them." Another aspect of that agenda is the church's opposition to capital punishment. In March 2005, the U.S. Conference of Catholic Bishops, for the first time in 25 years, launched a campaign against the death penalty -- another issue where it and many Republicans diverge.

Mahony said the scandal involving molestation of children by priests had caused the church to focus on itself. "You have to keep in mind in 2002 the sexual abuse thing arose and that predominated the church . . . and also kept us away from some of our traditional activities," he said. Now, he contended, the church has been made safe for children, so its leadership is eager to focus on other social issues.

Mahony has been criticized by parishioners and other Catholics for his stance in the scandal. He directed a tough legal battle against the Los Angeles District Attorney's Office, which wants access to the diocese's personnel records to investigate possible felony child-molestation charges against as many as 100 priests.

The archdiocese wants to keep the records closed. Analysts close to the church said that by taking a strong, principled stance on a different prominent issue, especially one such as immigration that harkens back to his past, Mahony is reminding his flock of the breadth of his achievements and his longtime commitment to social justice.

Asked if he took his position on Ash Wednesday with an eye to turning his legacy away from the sex abuse scandal and back toward issues that have informed his religious life, Mahony shook his head. "I don't believe in legacies at all," he said. "I don't see anything in the gospels that speaks about legacies, except everlasting life."