ADVERTISEMENT

At about 10:30 p.m. EDT, Sanders led 53 percent to 47 percent, with 92 percent of precincts reporting, according to The Associated Press.

Sanders will win more of the state's 83 pledged delegates, helping him gain a little ground on Clinton as he tries to keep her from clinching the nomination. He thanked his supporters on Twitter.

The political revolution wins in Indiana! Thank you. pic.twitter.com/Ix7wutAw2g — Bernie Sanders (@BernieSanders) May 4, 2016

Clinton led state polls by about 7 percentage points before the Tuesday primary. This is not the first time Sanders defied polling to pull off a stunning upset. In Michigan, he trailed by 21 points in polls before winning the state primary

The surprise win gives Sanders and his supporters a much-needed boost at a time when hope seemed to be fading among even his most hardcore followers.

But despite the victory, Sanders has a lot of work to do to catch Clinton.

The former secretary of State entered the day with 1,645 pledged delegates, to 1,318 for Sanders. Factoring in superdelegates as well, her lead expanded to more than 800 total delegates, according to The Associated Press.

Clinton entered Indiana on a hot streak, having won five of the previous six contests to pad her lead.

Sanders now needs to convert his Indiana momentum into a string of victories through the June 7 California primary to have any hope of securing the Democratic nomination.

Updated at 10:30 p.m.