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 late on Monday night.
Superdelegates are party insiders who can pledge their support for a candidate ahead of the convention but do not formally vote for them until the convention itself.
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. Why aren't we more excited about Clinton?
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 going to fight hard for every single vote, especially right here in California."