SACRAMENTO — Rep. Xavier Becerra recalls proudly working alongside his father as a teenager on sweaty construction jobs in Sacramento to help make ends meet. The son of immigrants, Becerra and his family of six lived in a cramped, 685-square-foot house.

Those memories are close to the surface each time he finds himself involved in a debate in Congress on policies that affect immigrants or working families.

Now, as the Los Angeles congressman is on the verge of becoming California’s first Latino attorney general, he is being asked to draw once again on that background as the state’s top lawyer at a time when President-elect Donald Trump is proposing mass deportations and construction of a border wall. Becerra’s confirmation was recommended Wednesday by the Senate Rules Committee and is expected to get a final vote in the full Senate next week. His nomination was confirmed by the Assembly last week.

“My parents inform everything I do in Congress, whether it’s because of their immigrant background or just their hardworking nature or the fact that education was not open to them, so it stopped them from doing things,” Becerra said.

The Democrat says he has been in this position before. He was elected to the Assembly in 1990, the same year Republican Pete Wilson, a hard-liner on immigration, was elected governor.

“It is sort of a ‘Twilight Zone’ issue for me because when I left for Congress, California was in the midst of this anti-immigrant sentiment,” Becerra recalled recently. “And now, as I come back, California is so forward-leaning on this stuff … and it sounds like the new federal government may try to move in directions that Pete Wilson’s state government tried to move in.”

Becerra, who has served 12 terms in Congress, most recently as the House Democratic Caucus chairman, was picked by Gov. Jerry Brown to succeed Kamala Harris, who resigned after her election to the U.S. Senate.

Friends and associates describe him as whip-smart and studious, with a history of going up against powerful leaders of his own political party, even if it hurt his career.

Becerra, 58, is the son of Mexican immigrants — his mother is from Guadalajara and his father, Manuel, was born in Sacramento but raised in Tijuana. His parents married at 18 and moved to the United States.

Becerra’s father started out picking vegetables in the fields.

“He got treated like he wasn’t a citizen,” Becerra said. “He couldn’t walk into restaurants because the sign said ‘No dogs or Mexicans allowed.’ He harvested the food that they were eating in those restaurants, but he could not go in there and eat.”

The senior Becerra moved to jobs canning tomatoes for Campbell’s, fixing railroad cars and doing road construction in the state capital. Becerra’s mother was a clerical worker.

Becerra said he would fight to protect California policies that help immigrants in the country illegally to get driver’s licenses, college financial aid and legal assistance in fighting deportation orders.

Becerra, fluent in Spanish, was the first member of his family to go to college. He got good grades in high school while enjoying golf and poker in his off hours.

When a friend tossed away an application to Stanford University, Becerra filled it out on a whim and submitted it — and was accepted. He went on to earn a bachelor’s degree in economics from Stanford, where he met his wife, Carolina Reyes, who is a physician. He earned a law degree from Stanford Law School.

A close friend, Arturo Vargas, attended Stanford with Becerra.

“He was a nerd,” Vargas said of the young Becerra. “I always thought of him as a milk-drinking, hard-studying guy. He was always too busy studying in law school to be involved in other activities.”

Becerra stood out at Stanford and afterward as a smart, natural leader, said Vargas, executive director of the National Assn. of Latino Elected and Appointed Officials, based in Los Angeles.

After college, Becerra worked as an aide to state Sen. Art Torres and did a four-year stint in the civil division of the state attorney general’s office under John Van de Kamp, with whom he has stayed in touch.

“He’s just a decent person. He has good political judgment,” Van de Kamp said, adding that Becerra is “a man of real civility who has the potential of getting the office behind him.”

Becerra ran for the Assembly in 1990 at the encouragement of Torres.

His bills created tougher penalties for gang crimes near schools, sought to make it easier for 18-year-olds to register to vote and restricted businesses from requiring employees to speak only English in the workplace.

Willie Brown, who was Assembly speaker while Becerra was an assemblyman, described his former colleague as an “absolutely superior” legislator.

After just two years in the Assembly, Becerra won a seat in Congress with support from leaders including then-Assemblywoman Gloria Molina. In Washington, Becerra focused on policies affecting working families and the poor.

The transition to Congress was not without its bumps.

As a freshman legislator, Becerra ruffled feathers by standing up to late Illinois Rep. Dan Rostenkowski, then the powerful Democratic chairman of the House Ways and Means Committee. The senior lawmaker was threatening to cut disability benefits to legal immigrants, and Becerra and other Hispanic Caucus members negotiated an agreement to avert the cuts.

But at a weekly Democratic members meeting, the freshman got into a heated debate with Rostenkowski over the issue. Becerra responded to comments by the chairman that he thought were disparaging to immigrants.

Later, Rostenkowski criticized the compromise on the floor and it was defeated. Becerra said he learned a lesson about legislative politics, but he does not regret speaking his mind.

He would later become the first Latino on the powerful House Ways and Means Committee.

Becerra, who has three daughters, says he is proud to have voted against the Iraq war and to have been one of 67 House members who voted against the Defense of Marriage Act, which sought to limit marriage to a union between a man and a woman.

House Democratic leader Nancy Pelosi praised Becerra this month for his “sound policy judgment and keen intellect.”

But while Becerra has plenty of fans, others question whether he has been a politician too long.

Fellow Democrat Adrienne Edwards ran unsuccessfully against Becerra in November. She did so, she said, because she saw his 26 years in office as part of the problem with an entrenched Congress that has dragged its feet on problems including homelessness, ineffective schools and the need for immigration reform.

“I feel the care for the people and everyday citizen from Becerra was lost somewhere along the way,” she said.

He won reelection with 77% of the vote.

Becerra also has had a few stumbles in politics.

He was widely criticized for being among a number of politicians who pressed President Clinton to consider whether to commute the prison term of Carlos Vignali, who was convicted in 1994 for his role in a cocaine drug ring.

Becerra wrote a letter supporting a review of Vignali’s case after Vignali’s father, Horacio, a Los Angeles businessman, contributed $14,000 to Becerra’s campaign committee.

“I can understand why they would criticize,” Becerra said recently. “If you read the letter, I wrote it only after having seen how so many people, civic and elected leaders, had written on behalf of Mr. Vignali. I tried to make it clear in my letter that I wasn’t calling for a pardon, but that they examine the situation. I regret the way it played out.”

In 2001, Becerra angered some Latino leaders when he decided to run for mayor of Los Angeles after a candidacy was launched by former Assembly Speaker Antonio Villaraigosa. Some saw that as splitting the Latino vote, and Becerra’s campaign was accused of dirty tricks.

A Los Angeles County district attorney investigation concluded that Becerra’s campaign staff had been responsible for robocalls that accused Villaraigosa of being soft on crime.

The automated calls featured a woman calling herself “Gloria Marina.” Many felt that was meant to be confused with Gloria Molina, a county supervisor and Villaraigosa supporter at the time.

No charges were filed over the misleading phone calls, but one angry leader, Joe Benites, former president of the League of United Latin American Citizens, told The Times then: “Xavier will never have another bowl of menudo in this town.”

Becerra finished fifth in the primary with only 5.9% of the votes, and did not endorse Villaraigosa in the runoff won by James Hahn, or the 2015 election, which Villaraigosa won.

Becerra said he has since “patched things up” with Villaraigosa.

“That was an unfortunate incident,” Becerra said of the “Gloria Marina” episode. “I absolutely regret that. That was one of the hardest things to have to live with: That something was done in my name without my knowledge, but it was in my name so people only remember that. I do apologize to him.”

Villaraigosa, who is running for governor, insists he has put the dispute behind him.

“I wish him the best,” Villaraigosa said of Becerra. “He is going to be solid. He certainly understands that California has charted a different path than this new administration on healthcare and climate change and how we treat our newcomers, our immigrants.”

Other top Democrats, including Pelosi, have rallied in support of Becerra, calling him the right person to defend California against a hostile Washington.

“It is reassuring to know that Xavier will continue the fight to protect California’s interests against any misguided efforts by the Trump administration to roll back the progress we’ve made,” the Democratic leader said in a statement this week.

patrick.mcgreevy@latimes.com