California Gov. Jerry Brown (D) has nominated Rep. Xavier Becerra (D-Calif.) as California’s next attorney general, replacing Senator-elect Kamala Harris (D).

“Xavier has been an outstanding public servant ― in the State Legislature, the U.S. Congress and as a deputy attorney general,” Brown said in a statement released Thursday morning. “I’m confident he will be a champion for all Californians and help our state aggressively combat climate change.”

Becerra, a 12-term congressman who represents part of Los Angeles, would be California’s first Latino attorney general. His nomination must be confirmed by the state legislature ― which is very likely, given that Democrats have a supermajority in both chambers.

“Governor Brown and our state leaders lean forward when it comes to advancing and protecting the rights and interests of the more than 38 million people in California,” Becerra said in a statement. “I’m deeply honored by Governor Brown’s confidence in me to serve as our state’s next chief law enforcement officer. It has been an extraordinary privilege to serve my fellow Californians in Congress for the past 24 years, fighting for working families like my parents, and I look forward to continuing that battle as California’s attorney general.”

Brown’s choice is a surprise to many in the state. Long seen as a rising star in the Democratic Party, Becerra was not among the many names floated as a likely replacement for Harris. Many expected Brown to select a placeholder, such as a career Justice Department staffer, to fill the role until the 2018 election.

But the timing makes sense for the congressman, who is currently the House’s fourth-highest-ranking Democrat. His term as chairman of the House Democratic Caucus is up, and with House Minority Leader Nancy Pelosi (Calif.), House Minority Whip Steny Hoyer (Md.) and Assistant Democratic Leader James Clyburn (S.C.) all staying in their leadership roles, Becerra had no immediate path to moving up in the ranks. Becerra, who spoke at the Democratic National Convention in July, was also floated as a likely candidate for a cabinet role in a Hillary Clinton administration ― an opportunity that went out the window with the election of Donald Trump.

Becerra’s background also fits the bill. Prior to serving in the California Assembly and the U.S. House, he was the state’s deputy attorney general. He’s also a strong advocate of climate policy ― a major priority of Brown’s administration ― and a vocal opponent of Trump’s immigration policies. As California’s second most powerful statewide official, Becerra would play an instrumental role in the state’s pledge to stand up to Trump.

Pelosi praised Becerra’s nomination, commending the congressman as a “a relentless fighter for progressive values.”

“Xavier’s strategic leadership, keen intellect and substantive policy expertise have been crucial to the progress House Democrats have achieved for working families,” she said in a statement.

Meanwhile, the race for Becerra’s House seat has already kicked off:

Former speaker of the California state Assembly John A. Pérez jumps into race for Becerra's seat #CA34 — Simone Pathe (@sfpathe) December 1, 2016

In a conference call with reporters Thursday afternoon, Becerra said he, too, was surprised to receive the nod from Brown.

“This was very sudden in its nature,” he said. “I didn’t have conversations [with Brown] until very very recently.”

Becerra declined to say whether he’d run for a full term in 2018, nor did he get specific on his priorities for California’s Justice Department, saying he’s currently focused on getting confirmed. But he did speak more broadly about the areas he hopes to focus on, including energy policy, immigration, criminal justice reform and public safety.

He also hinted at the likely challenges of taking on the role during the Trump presidency.

“The federal government is, I don’t believe, going to be as much of a friend to California, and I hope it doesn’t become a foe of California, but we have to be prepared to defend the forward-leaning programs that California has made for its people,” he said. “I’m hoping that while the landscape may have changed, the results will continue to be the same for our state.”

This article has been updated to include a statement from Nancy Pelosi and information from a conference call with Xavier Becerra.