 -- Donald Trump has reached the number of delegates needed to secure the Republican Party's presidential nomination.

Based on ABC News’ analysis of pledged delegates won and commitments made by unbound delegates, Trump has enough support to secure the Republican nomination for president. He now has 1,239 total delegates, according to ABC News' estimates of both pledged and superdelegates.

Trump has surpassed the 1,237 delegates needed to secure the nomination. That said, he will not formally become the nominee until delegates cast their votes at the Republican National Convention in Cleveland in July.

He reached the magic 1,237 number with more than a half-dozen contests left to go, including California, the most delegate-rich state in the country.

Reince Priebus, the head of the Republican National Committee, called Trump the presumptive Republican nominee after his closest competitor, Sen. Ted Cruz, suspended his campaign after his loss in the Indiana primary May 3. Ohio Gov. John Kasich was still in the race at the time, but dropped out the next day.

During an energy policy speech in North Dakota today, Trump thanked the local delegates for being the ones to put him over the edge.

"I was coming out of my building this morning and there was a big news flash that Donald Trump had won the nomination. And I said, ‘What happened.’ I thought I had to wait a couple more weeks," Trump said this afternoon.

"North Dakota, you brought us over the line folks. I will always remember that."