Vermont Senator Bernie Sanders won an upset victory in Indiana's Democratic presidential primary on Tuesday, slowing Hillary Clinton's progress to the nomination and giving his campaign a much-needed boost as the campaign enters its final stage.

Based on vote counts and exit polls, Sanders was projected the winner by multiple television networks. In the Republican primary, Donald Trump emerged as the party's all but certain nominee with a decisive victory that forced his main challenger, Texas Senator Ted Cruz, out of the race.

Clinton, the former secretary of state, narrowly led in the most recent polling in the state, although her campaign had worked to lower expectations for a win ahead of the results. Still, the margin of Sanders' victory came as a blow at a time when she is trying to focus on the general election. With two-thirds of precincts reporting, Sanders had 53 percent to Clinton's 47 percent.

The victory will do little to diminish Clinton's nearly insurmountable delegate lead. Ahead of the Indiana results, she had more than 90 percent of the 2,383 delegates and superdelegates needed to win the nomination, according to an Associated Press tally. Sanders had 1,357, or about 57 percent.

Indiana will award 92 Democratic delegates, with their distribution determined by the vote statewide and in each of nine congressional districts.

Sanders has given no indication that he'll drop out of the race before the final Democratic primaries in June. His continued presence creates a delicate balancing act for Clinton, who needs to be careful not to be dismissive of him and his supporters while also trying to pivot to the general election.

Clinton was already making that pivot on Tuesday, campaigning in the traditional general election battleground state of Ohio. She also made campaign stops this week in West Virginia and Kentucky, which hold primaries on May 10 and May 17.