Hillary Clinton has clinched the Democratic nomination for US president after reaching the required number of delegates, an AP tally suggests.
The count puts Mrs Clinton on 2,383 – the number needed to make her the presumptive nominee.
She will become the first female nominee for a major US political party.
But rival Bernie Sanders said Mrs Clinton had not won as she was dependent on superdelegates who could not vote until July’s party convention.
Mrs Clinton reached the threshold with a big win in Puerto Rico and a burst of last-minute support from superdelegates, AP said.
Analysis, by Katty Kay, presenter, BBC World News
It has taken a long 227 years to get even this far.
George Washington was elected president of a newly independent America in 1789. Forty-four men later (43 of them white) Hillary Clinton makes history today by being the first female nominee for the White House.
So why don’t I feel more excited?
The lack of exuberance may come from the fact that this has all been going on for so long.
We’ve really been reworking a version of the “first viable female candidate for the presidency” story since 20 January 2007, the first time Hillary Clinton declared her candidacy for the White House.
We’re exhausted. We’ve run out of superlatives. We’ve overused every anecdote from the former first lady, former senator, former secretary’s well-covered life.
A woman president would be new, Hillary Clinton is not.
At an appearance in Long Beach, California, shortly after the news broke, she said: “We are on the brink of a historic and unprecedented moment but we still have work to do.
“We have six elections tomorrow and we’re gonna fight hard for every single vote, especially right here in California.”
Voters will go the polls for Democratic primaries tomorrow in California, Montana, New Mexico, North Dakota, South Dakota, and New Jersey.
Superdelegates, who are party insiders, can pledge their support for a candidate ahead of the convention but do not formally vote for them until the convention itself.
The nominee for either party is not officially named until the parties’ respective conventions.
Mr Sanders has vowed to stay in the race until the convention, and his campaign team said the Vermont senator would attempt to win back superdelegates who have pledged their support to Mrs Clinton.
His spokesman Michael Briggs said it was too early to call the Democratic contest.
“It is unfortunate that the media, in a rush to judgement, are ignoring the Democratic National Committee’s clear statement that it is wrong to count the votes of superdelegates before they actually vote at the convention this summer,” he said.
“Our job from now until the convention is to convince those superdelegates that Bernie is by far the strongest candidate against Donald Trump.”
Mrs Clinton, a former secretary of state, New York senator and first lady, leads Mr Sanders by three million votes, 291 pledged delegates and 523 superdelegates, according to AP’s count.
She won 29 caucuses and primaries to his 21 victories – and an estimated 2.9 million more voters have backed her during the nominating process.
That gives her a significantly greater lead over Mr Sanders than Barack Obama had over her in 2008 – he led by 131 pledged delegates and 105 superdelegates at the point he clinched the nomination.
Speaking at a rally in San Francisco, Sanders promised supporters he would win in California: “As of today, we have won primaries and caucuses in twenty states across this country.
“And tomorrow, in the most important primary in the whole Democratic nominating process, we’re going to win here in California.”