Sen. Beie Sanders on Tuesday night won the Oregon Democratic Primary but remained deadlocked with party front-ruer Hillary Clinton in Kentucky, in a too-close-to-call race that will likely keep their contest going into the July convention.

The Associated Press called the Oregon race for Sanders about 40 minutes after the balloting ended.

“We just won Oregon, and we’re going to win Califoia,” the Vermont senator said at a rally in Carson, Calif., where he vowed to “fight” in the state’s June 7 primary and through to the party’s July nominating convention.

The Associated Press also declared GOP presumptive presidential nominee Donald Trump the wier of the Oregon Republican primary, the party’s only contest Tuesday.

"Congratulations to THE MOVEMENT, we have just won THE GREAT STATE OF OREGON," Trump tweeted. "The vote percentage is even higher than anticipated! Thank you."

There were 29 Republican delegates at stake in Oregon.

The latest headlines on the 2016 elections from the biggest name in politics. See Latest Coverage →

In Kentucky, Clinton and Sanders were deadlocked at roughly 46 percent, with 99 percent of polls reporting.

However, the Clinton campaign tweeted about four hours after the polls closed: "We just won Kentucky! Thanks to everyone who tued out. We’re always stronger united."

Clinton was looking for victory Tuesday to stop Sanders' persistent challenge, having won 10 wins of the last 15 contests before Oregon and Kentucky, so she can focus her attention and resources on Trump.

Clinton has a seemingly insurmountable lead in the delegate race, and needs just 143 more of them in Oregon, Kentucky and the seven remaining races to clinch the Democratic nomination.

There were 55 delegates at stake in Kentucky and 61 in Oregon.

With the tight margin in Kentucky, Clinton and Sanders will split the state's delegates fairly evenly -- each picking up at least 25. Five delegates remain to be allocated, pending final vote tallies.

"It looks like we're going to end up with about half of the delegates," Sanders also said in Califoia.

Clinton was expected to compete in Kentucky, having soundly defeated Barack Obama there in their 2008 primary contest, and limited polling showed her with a double-digit lead before Tuesday.

She made numerous campaign stops in the state, include one in Louisville this past weekend, touting a pro-jobs agenda to help a state with high unemployment and trying to focus on Trump.

"I’ve never heard such reckless, risky talk from somebody about to be a nominee for president than I’ve heard from Donald Trump when it comes to nuclear weapons,” she said at a rally Sunday. “He says he would use nuclear weapons. This is scary, dangerous talk."

However, Idea in March about how her renewable energy plan was “going to put a lot of coal miners and coal companies out of business” likely hurt her in easte Kentucky.

Trumped tweeted as the Kentucky polls closed: "I look so forward to debating Crooked Hillary Clinton! Democrat Primaries are rigged, e-mail investigation is rigged - so time to get it on!"

Sanders was also expected to have challenges in Kentucky, considering voters had to be registered Democrats by January, which excluded a lot of his independent-voter support. Clinton was 8-0 in such contests before Kentucky and Oregon, which also held a closed primary.

“I think in Oregon and in Kentucky, if we can bring out large numbers of people, I think we're going to win,” Sanders told reporters Tuesday while in Puerto Rico, before polls closed.

Sanders' string of victories has inspired him to keep his long-shot campaign alive, despite Democrats calling for him to exit the race because his continued attacks appear to be hurting Clinton’s general election chances.

Only Sanders, a self-described democratic socialist, made campaign stops in Oregon, one of the most liberal states in the country.

Before Tuesday, Trump needs 103 delegates more with 436 still available in the party’s seven remaining state contests to secure the GOP nomination.

Texas Sen. Ted Cruz and Ohio Gov. John Kasich remain on the write-in ballots, which were printed before they suspended their campaigns May 3.

While Clinton has struggled to put away Sanders, Trump has repeatedly hammered the former secretary of state and her husband, former President Bill Clinton.

The real estate mogul recently accused Clinton of being a "total enabler" of her husband's extra-marital affairs, while calling Bill Clinton "the biggest abuser of women, as a politician in the history of our country."

Further complicating matters for the Democratic Party leadership, Trump has encouraged Sanders to pursue an independent run in the general election.

He has repeatedly talked about how Sanders is being treated poorly by the party establishment.

Sanders supporters this past weekend upended Nevada’s state party convention over the appointing of convention delegates.

The state party in response sent a letter to the Democratic National Committee that claimed the supporters displayed a "penchant [for] actual violence.”

The Associated Press contributed to this report.