Hillary Clinton laid claim to the Democratic presidential nomination Tuesday night, making a full pivot to a nasty general-election fight against Donald Trump as she prevailed in a vigorously contested primary in California against Sen. Bernie Sanders.

Clinton, the first woman chosen as the standard-bearer of a major American political party, celebrated the occasion with a forward-looking address to supporters in Brooklyn, not far from her campaign headquarters and just a few miles from New Jersey — where she defeated Sanders in the first of six states voting Tuesday.

Although Clinton unofficially clinched the nomination the previous evening, she embraced the historic nature of her bid at her victory celebration Tuesday, debuting a video that placed her within the tradition of “women of the world who have blazed new paths.”

Basking in a moment eight years in the making, Clinton took the stage with her hands clasped to her heart as supporters cheered and screamed. She took her time walking through the crowd to the lectern, shaking the hands of her exuberant supporters.

“Thanks to you, we’ve reached a milestone, the first time in our nation’s history that a woman will be a major party’s nominee,” Clinton said. “Tonight’s victory is not about one person — it belongs to generations of women and men who struggled and sacrificed and made this moment possible.”

Democratic presidential candidate Hillary Clinton spoke at her Brooklyn headquarters June 7. She thanked supporters and said that rival Donald Trump is "trying to wall off Americans from each other." (Victoria Walker/The Washington Post)

Clinton won easily in the New Jersey primary and held off a robust challenge from Sanders in California, the nation’s most populous state, where voters also had their say Tuesday.

Clinton had sought to avert a loss there with nearly a week of intensive campaigning. As the country’s most diverse state, and a wellspring of Democratic support and campaign cash, California was a symbolic but important final test of Clinton’s strength as a communicator and candidate.

The contests in the six states came on a busy day following Clinton’s abrupt clinching of the nomination Monday night because of a revised delegate count by the Associated Press.

In the wake of that milestone, party elders, including House Minority Leader Nancy Pelosi (Calif.), stepped up efforts to unify Democrats for the fall, and a spokesman for President Obama indicated that he was eager to help broker peace between Clinton and Sanders and start campaigning for the party’s nominee. Obama called both candidates Tuesday night and will meet with Sanders on Thursday, the White House said late Tuesday.

“Bernie knows better than anyone what’s on the line in the election and that we at some point have to unify as we go forward,” Pelosi said in an interview with George Stephanopoulos on ABC’s “Good Morning America.” “He wants to influence the platform. I think that’s fine.”

During her remarks Tuesday night, Clinton offered a grace note to Sanders and to his supporters watching her speech. “I know it never feels good to put your heart into a cause or a candidate you believe in and come up short. I know that feeling well.”

She said Sanders and the “vigorous debate we’ve had” have been “very good for the Democratic Party and for America.”

Sanders was scheduled to fly home to Burlington, Vt., on Wednesday and had already planned to be in Washington on Thursday for a rally, five days ahead of the final primary of the year in the nation’s capital.

Many of Sanders’s supporters view Clinton suspiciously, as part of the political establishment that the senator railed against during his campaign. Some have vowed to sit out the general election or write in Sanders’s name on the ballot. They include many young voters who could be an important bloc for Clinton in November.

During a raucous late-night rally in Santa Monica, Sanders acknowledged that the battle ahead would be “very steep” but he pledged to “continue to fight” for every vote and delegate, including in next week’s primary in Washington.

“We are going to fight hard to win the primary in Washington D.C. and then we take our fight for social, economic, racial and environmental justice to Philadelphia, Pennsylvania,” Sanders said, referring to the site of the Democratic convention in late July.

A crowd of more than 3,300 erupted when Sanders took the stage, and he was greeted by sustained cheers that lasted more than two minutes.

He exited in dramatic fashion, his voice rising as blue “Bernie” signs waved in the air.

“Thank you all,” he said. “The struggle continues!”

On Wednesday, the Sanders campaign plans to part ways with many staffers, in particular people who work on advance and field operations, according to an aide familiar with internal discussions. The aide framed the departures as an expected shrinking of personnel following the end of the major primaries, with only Washington left on the calendar.

The nomination was a prize that slipped through Clinton’s fingers eight years ago and for which she had to battle this time against another unexpectedly potent primary challenger. The difficulty she had in vanquishing Sanders, a self-described democratic socialist whose ideas captivated a large swath of the Democratic electorate, underscored weaknesses she carries into the fall contest against Trump, the presumptive Republican nominee.

Trump held an election-night news conference Tuesday, seeking to reset his campaign after a troublesome stretch, including roiling controversy over his assertions that a federal judge overseeing lawsuits against Trump University should have recused himself because of his Mexican heritage.

In remarks at his golf resort in Briarcliff Manor, N.Y., Trump said that Clinton had perfected the “politics of personal enrichment” during her time in public life, accusing her of turning the State Department into her “private hedge fund.” He pledged to deliver a “major” speech as early as Monday on “all of the things that have taken place with the Clintons.”

Trump also sought to reach out to Sanders’s backers, calling the election system “rigged” and asserting that he would be more in line with their views on “terrible trade deals” than Clinton.

“We welcome you with open arms,” he told Sanders supporters.

Clinton’s campaign chairman, John Podesta, brushed off Trump’s promise to relitigate Clinton’s past controversies.

“I don’t think that the American public wants to relive the charges that he’s throwing out,” he said on MSNBC after Trump spoke.

Tuesday’s primaries were somewhat anticlimactic, given the AP’s tally Monday of Clinton’s support among superdelegates — the elected officials and other party elites whose convention votes are not bound by the primary results in their states. The AP count showed her reaching 2,383 pledged delegates and superdelegates, the exact number she needs to clinch the nomination.

Besides New Jersey and California, Democrats also held primaries and caucuses Tuesday in Montana, North Dakota, South Dakota and New Mexico — all states with relatively few delegates at stake.

Sanders won the North Dakota caucuses and Montana primary, while Clinton won in California, New Jersey, New Mexico and South Dakota, according to the Associated Press.

Clinton spoke inside a huge hall at the Brooklyn Navy Yard. Although it is called the Duggal Greenhouse, the building more closely resembles an airplane hangar. Nineteen flags flanked Clinton’s lectern, which was positioned in front of risers filled with supporters.

Hundreds more backers stood shoulder to shoulder on the concrete floor, some holding aloft tiny American flags.

Clinton will formally claim the mantle of Democratic nominee at the party’s convention in late July in Philadelphia.

With Tuesday’s results, she was expected to secure a majority of the Democratic Party’s pledged delegates, those awarded on the basis of primary and caucus results. Thus, the only remaining way for Sanders to win the nomination is to persuade superdelegates to effectively overturn the will of the voters.

Sanders has argued that one reason they should consider doing so is that polls have shown him beating Trump in the fall by larger margins than Clinton would.

Though Sanders has vowed to soldier on to the convention — and compete in the primary next Tuesday in the District — he faces a hard sell to the delegates he is trying to persuade.

Sen. Jeff Merkley (D-Ore.), the one sitting senator who has endorsed Sanders, said in an interview Tuesday that it was important to allow the remaining six states and the District of Columbia to cast ballots before declaring a presumptive Democratic nominee. But he added that just as Obama and Clinton saw “the lay of the land” in 2008 after all the primary voters cast their ballots, “we’ll soon be able to see the parts of the party work together to unite.”

“I think we’ll be absolutely united in making sure the self-promoting huckster named Donald Trump never becomes president of the United States,” he said, adding that Clinton should learn from Sanders’s connection with voters.

During his remarks in Santa Monica, Sanders mentioned that he had a “kind call” with Obama earlier Tuesday and said he “looks forward to working with him to move this country forward” once they meet Thursday in Washington. Sanders said he also had a “very gracious call” from Clinton and congratulated her on her victories.

Boos echoed throughout the venue at the mention of Clinton’s name. Sanders did not shush them and plowed forward with his remarks

Tuesday marked the anniversary of the day eight years ago when Clinton conceded the Democratic nomination to then-Sen. Obama. The president could endorse Clinton as soon as this week, not waiting for the Democratic convention, according to White House press secretary Josh Earnest.

Speaking to reporters Tuesday, Earnest said that out of respect for the ongoing voting, “I’m not going to declare a winner from here.” But he emphasized that Obama intends “to make his voice heard in coming together” behind the presumptive nominee and plans to play a role in brokering a rapprochement between the two candidates.

He added that Obama’s endorsement could influence Republicans, not just Democrats, given his 7½ years in the job. “The president is an important validator.”

Clinton’s gender is certain to factor into the general election in multiple ways. She has embraced it much more than in her last presidential run, rebutting criticism from Trump that she is “playing the gender card” by saying she is proud of the phrase if it means working to champion women and families.

“I know we’ve never done this before,” she said at a recent campaign event in Fresno, Calif. “We’ve never had a woman president.”

Clinton reminded her listeners that she had been a U.S. senator for eight years, serving on the Armed Services Committee, before becoming secretary of state. Although she was speaking to supporters, she was offering a kind of reassurance about a female commander in chief that she is likely to repeat as she campaigns against Trump.

Ahead of her address Tuesday, Clinton sent this Twitter message:

“To every little girl who dreams big: Yes, you can be anything you want — even president. Tonight is for you.”

Her tweet was signed “H” to denote that she, as opposed to a campaign aide, had written it.

Abby Phillip in Washington contributed to this report. Costa reported from Los Angeles, and Wagner reported from Washington.