Rep. Xavier Becerra, a veteran lawmaker who rose to the top ranks of House Democratic leadership, was nominated to become California’s attorney general Thursday by Gov. Jerry Brown.

The move gives Becerra, the highest-ranking Latino in Congress, a new statewide perch to continue his political career, while also putting off a divisive internal fight among House Democrats for the top party slot on the powerful Ways and Means Committee. Pending confirmation by the state legislature, Becerra is set to fill the post that will vacated by Kamala Harris after she is sworn in as a U.S. senator Jan. 3.

“Governor Brown has presented me with an opportunity I cannot refuse — to serve as attorney general of my home state,” Becerra said Thursday. “As a former deputy attorney general, I relished the chance to be our state’s chief law enforcement officer to protect consumers, advance criminal justice reform and, of course, keep our families safe.”

Brown said in a statement that Becerra “has been an outstanding public servant” during a 30-year career in the state and federal governments. “I’m confident he will be a champion for all Californians and help our state aggressively combat climate change,” he said.

Before Election Day, the 58-year-old Becerra had been frequently mentioned as a potential Cabinet nominee for Hillary Clinton had she won the presidency. The California native spent more than two decades ascending the House Democratic leadership ladder, becoming caucus chairman in 2013. But he was term-limited out of that role for the coming Congress, and with Nancy Pelosi (D-Calif.) remaining as minority leader and Rep. Steny Hoyer (D-Md.) remaining as party whip, he had no immediate prospects for a top leadership position.

Before Thursday’s announcement, Becerra was gearing up to seek another powerful post — as the ranking Democrat on Ways and Means, which has broad jurisdiction over taxation, trade and entitlement programs. But he faced a strong challenge from another senior lawmaker, Rep. Richard Neal (D-Mass.), and the race was shaping up to be a proxy battle over Pelosi’s leadership.

Becerra, who represents a Los Angeles district, is a Pelosi loyalist, and the dismal results for Democrats on Nov. 8 have prompted an increasing number of House lawmakers to question her leadership. Pelosi won an eighth consecutive election as party leader, but nearly a third of Democratic members opposed her, and many more have pushed her to expand her leadership circle.

Now, it appears that Neal is poised to assume the post. The outgoing Ways and Means ranking member, Rep. Sandy Levin (D-Mich.), said as much in a statement Thursday.

“The State of California and Californians will be well served by Xavier’s tenacity and dedication to principles of equality, opportunity and inclusion,” Levin said. “The Ways and Means Committee will also be in good hands with Rich Neal as the Ranking Member and I endorse his election.”

Becerra must be confirmed by the Democratic state legislature before he takes office as California attorney general. He must stand for reelection in 2018 if he wishes to continue in office.

Becerra has not been a prominent voice in Congress on legal or judicial issues, but he worked in the California attorney general’s office before entering Congress, from 1987 to 1990. He holds a law degree from Stanford University.

Pelosi praised Becerra Thursday as a “steadfast champion for hard-working families in California and across America.”

“For nearly a quarter century, Xavier has been a relentless fighter for progressive values,” she said. “With his long history of public service – as a deputy attorney general in California, in the California state legislature and in the Congress – Xavier brings tremendous experience and expertise, courage and wisdom to the office of California’s top law enforcement officer.”