Defiant and determined to transform the Democratic Party, Senator Bernie Sanders is opening a two-month phase of his presidential campaign aimed at inflicting a heavy blow on Hillary Clinton in California and amassing enough leverage to advance his agenda at the convention in July — or even wrest the nomination from her.

Advisers to Mr. Sanders said on Wednesday that he was newly resolved to remain in the race, seeing an aggressive campaign as his only chance to pressure Democrats into making fundamental changes to how presidential primaries and debates are held in the future. They said he also held out hope of capitalizing on any late stumbles by Mrs. Clinton or any damage to her candidacy, whether by scandal or by the presumptive Republican nominee, Donald J. Trump.

After sounding subdued if not downbeat about the race for weeks, Mr. Sanders resumed a combative posture against Mrs. Clinton, demanding on Wednesday that she debate him before the June 7 primary in California and highlighting anew what he asserted were her weaknesses against Mr. Trump.

Mr. Sanders, his advisers said, has been buoyed by a stream of polls showing him beating Mr. Trump by larger margins than Mrs. Clinton in some battleground states, and by his belief that an upset victory in California could have a psychological impact on convention delegates who already have doubts about Mrs. Clinton.

But his newly resolute attitude is also the cumulative result of months of anger at the national Democratic Party over a debate schedule that his campaign said favored Mrs. Clinton; a fund-raising arrangement between the party and the Clinton campaign; the appointment of fierce Clinton partisans as leaders of important convention committees; and the party’s rebuke of Mr. Sanders on Tuesday for not clearly condemning a melee at the Nevada Democratic convention on Saturday.

While Mr. Sanders says he does not want Mr. Trump to win in November, his advisers and allies say he is willing to do some harm to Mrs. Clinton in the shorter term if it means he can capture a majority of the 475 pledged delegates at stake in California and arrive at the Philadelphia convention with maximum political power.

Tad Devine, a senior adviser to Mr. Sanders, said the campaign did not think its attacks would help Mr. Trump in the long run, but added that the senator’s team was “not thinking about” the possibility that they could help derail Mrs. Clinton from becoming the first woman elected president.

“The only thing that matters is what happens between now and June 14,” Mr. Devine said, referring to the final Democratic primary, in the District of Columbia. “We have to put the blinders on and focus on the best case to make in the upcoming states. If we do that, we can be in a strong position to make the best closing argument before the convention. If not, everyone will know in mid-June, and we’ll have to take a hard look at where things stand.”

The prospect of a drawn-out Democratic fight is deeply troubling to party leaders who are eager for Mrs. Clinton and House and Senate candidates to turn to attacking Mr. Trump without being diverted by Democratic strife. Mr. Sanders has won nearly 10 million votes, compared to Mrs. Clinton’s 13 million, and Democratic leaders say she needs time to begin courting the young voters, liberals and other Sanders supporters who view her as an ally of corporate and big-money interests.

But Mr. Sanders has sharpened his language of late, saying Tuesday night that the party faced a choice to remain “dependent on big-money campaign contributions and be a party with limited participation and limited energy” or “welcome into the party people who are prepared to fight for real economic and social change.”

Mr. Sanders’s street-fighting instincts have been encouraged by his like-minded campaign manager, Jeff Weaver, who has been blistering against the Clinton camp and the party establishment. On Wednesday, he took to CNN to accuse Representative Debbie Wasserman Schultz of Florida, the Democratic national chairwoman, of “throwing shade on the Sanders campaign from the very beginning.”

For weeks, some current and former Sanders campaign workers have privately acknowledged feeling disheartened about Mr. Weaver’s determination to go after the Democratic National Committee, fearing a pitched battle with the party they hope to support in the general election. The intraparty fighting has affected morale, they say, and raised concerns that Mr. Weaver, a longtime Sanders aide who more recently ran a comic book store, was not devoted to achieving Democratic unity. Several described the campaign’s message as having devolved into a near-obsession with perceived conspiracies on the part of Mrs. Clinton’s allies.

Democratic leaders said they wanted to do everything possible to avoid having Clinton-Sanders tensions send the Philadelphia convention into the sort of chaos they had expected to mar the Republican convention. So far, though, Mr. Sanders has not indicated that he would ask his delegates to support Mrs. Clinton, as she did in 2008 for Barack Obama.

“I’m hopeful that the two candidates will come together, and soon, which could blunt the possibility of real trouble at our convention,” said Edward G. Rendell, the former governor of Pennsylvania and a Clinton supporter who is chairman of the Philadelphia host committee for the convention. “But you look at what happened in Nevada, and you worry.”

The melee there, at which Sanders supporters revolted and threatened the state Democratic chairwoman in a fight over delegates, intensified concerns among Clinton allies. Senator Barbara Boxer of California, who attended the convention, said she spoke with Mr. Sanders late Tuesday and said he was “distressed” by the Nevada episode.

“He will be judged as whether or not he has leadership qualities by the way he handles this,” she said.

Senator Harry Reid of Nevada, who is close to Mr. Sanders, spoke with Mr. Sanders on Friday about not letting the state convention devolve into a messy fight. They spoke again on Tuesday afternoon, and Mr. Reid complained that a staff member who had attended feared for her safety. But Mr. Sanders’s subsequent statement condemning the violence, which mostly dwelled on how dismissively he felt the party was treating him, did little to soothe Mr. Reid’s unease.

“Bernie and I have known each other for a long time, and I believe he is better than this,” Mr. Reid said Wednesday.

But some Sanders supporters said that Democrats were ignoring an undercurrent of anger among those who fear that Mrs. Clinton, if elected, would lack the courage to challenge her friends and political contributors.

“We want to have progressive values and socialism on the convention’s agenda, rather than slip back into centrist Democratic thinking if she gets elected,” said Tick Segerblom, a state senator in Nevada and a Sanders supporter. “I think there could be some chaos at the convention – at least outside, with a lot of anarchists, socialists, young people.”

Mrs. Clinton’s campaign has largely taken Mr. Sanders’s latest broadsides in stride. In soliciting donations Wednesday, it said that the two-front battle against Mr. Sanders and Mr. Trump was “one of the toughest parts of our campaign so far.” A Clinton campaign spokesman declined to comment about Mr. Sanders’s debate proposal in California.

Privately, Mrs. Clinton’s advisers said Mr. Sanders could win California but emphasized their confidence that Mrs. Clinton would still win the nomination. She now has a total of 2,293 pledged delegates and superdelegates; she needs 90 more to win the nomination, although superdelegates can shift their support up to the convention. Mr. Sanders has 1,533 pledged delegates and superdelegates.

Mr. Sanders is now running slightly behind Mrs. Clinton in California in public polls. Ben Tulchin, Mr. Sanders’s pollster, pointed to signs of rising voter registration in California among young people and independents — two core Sanders constituencies — as evidence that he could win the state. But Hispanic registration is also rising, which could benefit Mrs. Clinton. With Mr. Sanders expected to campaign aggressively over the next three weeks, his supporters in the state said they were focused on winning the primary, not on November.

“If you want to talk about historic, let’s talk about the record turnout numbers at his rallies,” said Mayor Bao Nguyen of Garden Grove, Calif., a Sanders supporter. “Senator Sanders isn’t obliged to help Secretary Clinton if she wins. That’s a decision his team can make if they face that choice.”

Senator Jeff Merkley, Democrat of Oregon, Mr. Sanders’s lone endorser in the Senate, said that the party’s divisions would only deepen if Mr. Sanders was driven from the race now.

“You can’t say to them, ‘Hey we don’t want to hear your views,’ and shut the door on them,” Mr. Merkley said, “and then a month later open the door and say, ‘Hey, can you come in and help us out?’