Democratic front-runner Hillary Clinton declared victory in the Kentucky primary on Tuesday, potentially disrupting a string of expected primary losses this month that had threatened to weaken her even as she turned her focus to her likely matchup against Republican Donald Trump in the general election.

Sen. Bernie Sanders of Vermont, meanwhile, was declared the winner of Oregon’s Democratic primary.

The outcomes will do little to change the dynamics in the race. In Kentucky, Sanders had hoped to continue a state winning streak that began in Indiana and West Virginia this month.

With 99.8 percent of precincts counted, Clinton was ahead by less than 1 percentage point, and the Associated Press declared the race too close to call. Asked whether Sanders would consider seeking a recount, spokesman Michael Briggs said in an email: “We’ll take a closer look at the numbers in Kentucky and make a decision on Wednesday.”

Although Sanders had been favored to win Kentucky in recent polls, Clinton’s advisers sensed an opportunity to pull out a victory and invested heavily in the state in recent days. Clinton campaigned in Kentucky throughout the weekend and sent surrogates to appear on her behalf, including former president Bill Clinton.

1 of 46 Full Screen Autoplay Close Skip Ad × Clinton on the campaign trail View Photos The former secretary of state visits key states in her quest to become the Democratic nominee for president. Caption The former secretary of state, senator and first lady is the Democratic nominee for president. July 31, 2016 Hillary Clinton is seen aboard the campaign bus in Cleveland on the third day of a bus tour through Pennsylvania and Ohio. Melina Mara/The Washington Post Buy Photo Wait 1 second to continue.

Sanders drew large audiences across the state, while both Clintons at times faced unfriendly crowds in a state that once supported Bill Clinton overwhelmingly but that, in part because of the decline in the coal industry, has evolved into a redder state.

Sanders also spent time and money in recent days in other primary states, including Oregon and California. At a rally in Carson, Calif., late Tuesday, Sanders said: “It appears tonight that we’re going to end up with about half of the delegates from Kentucky.”

He also declared that winning the nomination remained possible. “No one can predict the future, but I think we have a real shot to win the primaries in a number of the states coming up,” he said. “Don’t tell the secretary of state. She might get nervous. I think we’re going to win here in California.”

Ahead of voting Tuesday, Sanders trailed Clinton by 283 pledged delegates, which are awarded based on the results of primaries and caucuses, according to the most recent tally by the Associated Press. He would need to win lopsided victories in nearly all of the remaining primaries to overtake her in the delegate count.

Oregon also held Democratic and Republican primaries Tuesday, and Trump and Sanders were declared the winners shortly after the polls closed.

While those primaries were playing out Tuesday, Sanders was locked in a controversy with Democratic Party leaders in Nevada over the conduct of his supporters at the state convention over the weekend, which was cut short after security officials declared they could no longer contain the disruption.

The dispute raised the prospects for a contentious nominating convention in Philadelphia this summer — something that Democratic leaders say would be harmful to the party as well as to Clinton’s prospects for preparing to confront Trump.

In front of a boisterous crowd in Carson, Calif., Democratic presidential candidate Bernie Sanders called on the Democratic party May 17 to "open the doors; let the people in." Sanders vowed to continue fighting rival Hillary Clinton for the party's presidential nomination. (Sarah Parnass/The Washington Post)

And like Tuesday’s close primary results in Kentucky, the fight also highlighted the never-ending nature of the Democratic nominating process — and the growing hard feelings between Democratic Party leaders and loyal Sanders fans.

State party officials accused Sanders supporters of inciting violence and sending threatening messages to party officials, including the state party chairwoman, Roberta Lange. Afterward, pro-Sanders graffiti was found scrawled on the state party headquarters building. The party filed a formal complaint with the Democratic National Committee about the conduct of Sanders supporters.

On Tuesday, Sanders condemned alleged threats, but he also stood by unhappy supporters who had claimed that state convention rules were being carried out unfairly to favor Clinton.

In a statement, Sanders called the Nevada Democratic Party’s claim “nonsense.”

“If the Democratic Party is to be successful in November, it is imperative that all state parties treat our campaign supporters with fairness and the respect that they have earned,” Sanders said. “Unfortunately, that was not the case at the Nevada convention.”

The Clinton campaign did not respond to a request for comment on the fracas, but Democratic National Committee Chairwoman Debbie Wasserman Schultz (Fla.) and Senate Minority Leader Harry M. Reid (Nev.) called on Sanders to condemn the violence.

Both primaries on Tuesday were open only to registered Democratic voters, a fact that probably hurt Sanders, given how strongly he has performed among independent voters in states that held open primaries.

In Kentucky, Sanders campaigned in the small western city of Paducah on Sunday, drawing nearly 2,000 supporters to a convention center.

But by the end, the Clinton campaign had slightly outspent Sanders on the airwaves. And she made her pitch to Kentucky with the help of a well-worn weapon: nostalgia for her husband’s administration.

[Here’s what happened at Saturday’s dramatic Nevada Democratic convention]

“I want to help bring back the kind of economy that worked for everybody in the 1990s,” Clinton said in Paducah on Monday morning, when she dropped by a packed diner to shake hands. “I’ve already told my husband, if I’m so fortunate enough to be president and he will be the first gentleman, I’m expecting him to go to work . . . and get incomes rising.”

That theme was particularly resonant in Kentucky, a state where Democrats recall Bill Clinton as the last of an era of Southern Democrats they identified with culturally.

“I saw you and your husband when you came through . . . and you stopped,” Holly Erwin, 63, told Clinton breathlessly in the Lone Oak Little Castle diner near Paducah. “My daughter saved her gum.”

Stories like these abound in Kentucky, but a general move away from Democratic leanings, particularly among those dependent on the coal industry, was a drag on Clinton’s performance.

Kentucky’s economy is more diverse than in West Virginia, where Clinton lost to Sanders by 16 percentage points last week. But Clinton didn’t help her standing in coal country when, in trying to describe her plans to help retool the economy, she said she planned “to put a lot of coal companies and a lot of coal miners out of business.”

Sanders dominated in coal country in the eastern part of the state. Returns showed Clinton performing well in Lexington and Louisville, two large population centers.

[Bill Clinton takes on protesters in coal country]

Even as the two candidates continued campaigning for the Democratic nomination, signs emerged that the general election was already in full swing.

A pro-Clinton super PAC released two scathing ads Monday aimed at the presumptive Republican nominee. The $6 million ad buy takes aim at Trump in a handful of swing states: Ohio, Florida, Virginia and Nevada.

Foreshadowing the fight to come over suburban female voters, the ads use Trump’s own words to paint him as insensitive and out of touch.

At the same time, Clinton has continued to largely ignore Sanders and focus instead on a general-election message that contrasts with Trump’s polarizing candidacy.

“I’m tired of people being on the Republican team or the Democratic team or the red team or the blue team,” Clinton said Monday in Hopkinsville, Ky. “Let’s be on the American team.”