“I like Jerry Brown, but people can make their own choices,” Mr. Sanders said. “What we have had to do, and we have done pretty well in every state in this country, is taken on Democratic governors, taken on Democratic senators, taken on Democratic members of the House, Democratic mayors and all of their political apparatus. And yet we have won in 20 states, and I think we are going to win here in California.”

Mr. Brown, in his letter, offered strong praise for Mr. Sanders, noting the similarities between the Sanders campaign and the one Mr. Brown waged when he ran for president in 1992.

“He has driven home the message that the top 1 percent has unfairly captured way too much of America’s wealth, leaving the majority of people far behind,” he wrote. “In 1992, I attempted a similar campaign.”

Still, the governor, who lost to Bill Clinton in a contest that left lingering bitterness between the two men, offered a powerful case against Mr. Trump in arguing that Mrs. Clinton had proved not only that she had abundant support among Democrats, but the ability to win in November. Mr. Brown met privately with Mrs. Clinton in San Francisco and Mr. Clinton in Sacramento last week.

Mr. Trump, Mr. Brown noted in his letter, “has called climate change a ‘hoax’ and said he will tear up the Paris Climate Agreement.”

“He has promised to deport millions of immigrants and ominously suggested that other countries may need the nuclear bomb. He has also pledged to pack the Supreme Court with only those who please the extreme right,” Mr. Brown wrote.

“The stakes couldn’t be higher,” he added.

Even if she loses here, Mrs. Clinton will almost certainly have enough delegates to win the nomination. But a loss in the largest state — and in a Democratic stronghold — would not only provide a dark end to what has been at times an unhappy campaign, but might also empower Mr. Sanders to stay in the race, further delaying the point when Mrs. Clinton can turn her full attention to Mr. Trump.