“Most insiders believed he wanted to move back to California, so all in all it was a pretty elegant political play,” said Peter Ragone, a political consultant in San Francisco who is advising Gavin Newsom, the lieutenant governor who is running for governor in 2018.

But the appointment shakes up a Democratic political world that had already been girding for fundamental changes as its three most senior elected officials, all of whom are over 70 — Mr. Brown, Senator Barbara Boxer and Senator Dianne Feinstein — prepare to exit from the scene. Mr. Becerra joins a very crowded list of Democrats angling for some of those jobs. And now he has the advantage of a perch, the office of attorney general, that historically has afforded its occupant a lot of exposure.

Mr. Becerra, 58, will now be one of the highest-ranking Latino officials in the state at a time when California is gearing up for clashes with President-elect Donald J. Trump on immigration. He could run for attorney general again and make a career out of that. But he now has a platform that will allow him to run for governor, or for that matter senator.

But not too soon.

“I don’t think it’s viable to get appointed and then quit immediately to run for something else, but he will run for something else down the road,” Mr. Ragone said.