Sanders told his audience that he was 'in this campaign to win the Democratic nomination'

It took nearly two hours for the race to be called for the Vermont senator, who claimed victory almost

Bernie Sanders told an audience in Salem, Oregon he was in it to win it after besting his rival, Hillary Clinton, in the West Virginia primary.

'Let me be as clear as I can be,' he told the crowd. 'We are in this campaign to win the Democratic nomination.'

'Now we will fully acknowledge – we are good at arithmetic – that we have an uphill climb ahead of us, but we are used to fighting uphill climbs,' Sanders said of the increasingly difficult delegate math.

As soon as West Virginia's polls closed, Sanders seized on an NBC News projection that said he'd won the state and sent out a celebratory email to his supporters.

It took another two hours, however, for the other networks to rubber stamp the results, calling the race for the underdog who was widely predicted to win the only Democratic race.

With 95 per cent of the vote in, Sanders won comfortably, 51 per cent to 36 per cent.

Sanders had moved his campaign to next week's Oregon battleground, where he touted his West Virginia victory by boasting that Clinton had won the Appalachian state by 40 points back in 2008.

'I think it will be a double-digit victory,' he told the screaming crowd.

By the time 80 percent was in, Sanders was up by 15 points.

Scroll down for video

Sen. Bernie Sanders celebrated his West Virginia victory by vowing to stay in the race against Hillary Clinton and promising that Donald Trump would be beat in the fall

Your browser does not support the <code>iframe</code> HTML tag. Try viewing this in a modern browser like Chrome, Safari, Firefox or Internet Explorer 9 or later.

The Democratic candidate gave his West Virginia victory speech in Salem, Oregon - where voters head to the polls next week - and vowed to press on, while attacking Donald Trump

The Vermont senator went through his usual routine of bringing up general election polls, where he performs better than Clinton against the Republicans' presumptive nominee, Donald Trump.

Trump, he told his supporters, is one area where he and Clinton definitely agree.

'We must defeat Donald Trump,' he proclaimed.

Sanders then turned his ire to the billionaire, who Clinton has also spent most of her time taking shots at as well.

'Now Donald Trump is not going to become president for a number of reasons,' Sanders began.

'And the major reason is the American people understand that we cannot have a president who has insulted Latinos and Mexicans. Who has insulted Muslims. Who everyday has insulted women in one way or another. Who has insulted veterans like John McCain and others,' Sanders ticked off.

Sanders admitted that his campaign still face an uphill battle, but was confident they could take it down to the wire against Hillary

Sanders then mentioned how Trump had 'insulted African-Americans in a very profound way.'

'People sometimes forget that before Mr. Trump was running for president he was one of the leaders of the so-called "birther" movement,' Sanders said.

'And that movement was a very ugly effort to de-legitimize the presidency of the first African-American president in our history,' Sanders noted.

Trump, Sanders echoed, will not be president because 'because the American people understand that our strength is in our diversity.'

'That we are a great nation because we are black and white and Latino and Asian-American and native American,' Sanders said.

'We are a great nation because we are gay and we are straight,' he continued.

'We are a great nation because we are women and men,' he went on.

Hillary Clinton (pictured on Tuesday) was beaten in West Virginia, after putting her foot in her mouth in March and insulting coal miners

She is still ahead in the delegate count, but will need victories in the remaining states to cement her position ahead of the convention

One third of Democratic voters in West Virginia are threatening to vote across the aisle during the general election if Hillary Clinton is their party's nominee

And using the billionaire's name similarity to how Clinton's has said, 'love trumps hate,' Sanders finger-wagged the Republican once again.

'And the American people understand that bringing us together always trumps dividing us up,' he said.

Exit polling had favored the underdog candidate in the state where Clinton had to apologize last week for putting her foot in her mouth while talking about the coal industry earlier in the race.

Three in 10 West Virginians said they lived in a house with a coal miner. And nine in 10 voters were white. The stats bode well for Sanders, whose message has resonated with white, working class voters.

While not much opinion polling had been conducted in the Appalachian State before today, the Real Clear Politics average put Sanders ahead by six points over his Democratic rival, which suggests an easy win tonight.

The state's open primary set up that allows independents to vote also helped Sanders. A third of West Virginians who cast ballots in the Democratic primary today put themselves in that category, according to ABC News' exit polling numbers.

In a twist from previous evenings, it was Clinton who spoke first tonight, holding a rally in Louisville, Kentucky, at the Slugger Hall of Fame that ended before polls closed throughout the state.

She took a single shot at Sanders, over the differences they have regarding their college tuition plans, and spent much of the rest of her time sticking it to Donald Trump and the Republican Party.

Former coal miner Bo Copley's (left) confrontation with Hillary Clinton (right) made national news when he asked her how she could say that she wanted to put 'coal miners and coal companies out of business'

This election has the 'highest stakes than we've seen in a long time' with Trump on the GOP ticket, she told her audience, which howled in turn at the mention of the real estate mogul who has become Democrats' version of the boogeyman.

'That's why it's important we have a big vote next Tuesday,' Clinton said, referring to the state's upcoming primary election, 'because we've gotta keep winning to go all the way to November to win the general election.'

Exit polling suggests Clinton may have a problem there. A third of voters in West Virginia who cast a Democratic ballot today said they'd rather see Trump as president than Clinton. Roughly the same number said they'd back Trump over Sanders.

He was set to speak on the West Coast at rally kicking off at 10 pm Eastern, hours after the race was supposed to be called for him in West Virginia.

The U.S. senator lags Clinton in votes nationally, and has little chance of beating her out for the nomination, but he's set to outperform her in this month's contests, including the one in West Virginia today.

Clinton's downward spiral in the coal-fired state dates back to March, when she talked up renewable energy while proclaiming that she would 'put a lot of coal miners and coal companies out of business.'

That didn't sit well with many West Virginians, where coal mining is still one of the most significant trades in the state.

Last Monday, she met Bo Copley, a former coal company employee, who held her feet to the fire at a roundtable discussion that candidate was hosting over the comments she had made.

'How you can say you are going to put a lot of coal miners out of jobs and then come in here and tell us how you are going to be our friends?' Copley asked the likely Democratic nominee, according to CNN.

Answering an emotional Copley, Clinton classified her remarks as a 'misstatement.'

'I don't know how to explain it other then what I said was totally out of context for what I mean because I have been talking about helping coal country for a very long time,' Clinton replied.

The candidate has suggested 'revitalizing' coal country by using $30 billion to retrain former miners.

The investment would also protect miners' health and pension benefits, as companies go out of business.

She's also said she will invest in clean coal technology.

'It was a misstatement because what I was saying is the way things are going now, they will continue to lose jobs,' Clinton continued.

'It didn't mean that we are going to do it,' she added. 'What I said is that is going to happen unless we take action to help and prevent it.'

She also said in West Virginia that day that she was advised to skip over the state and head straight to California, the biggest delegate prize left on the board, where voters don't head to the polls until June 7.

But, she said, 'I still want to compete in West Virginia.'

'I'm here because I want you to know whether people vote for me or not, whether they yell at me or not, it's not going to affect what I can do to help, because I feel like that's a moral obligation,' Clinton said.

But then, seeing the writing on the wall, Clinton headed off to California, a state she does need to win to finish off Sanders.

Meanwhile, two weeks ago when Sanders was slapped with losses out of Pennsylvania, Maryland, Delaware and Connecticut, which made his road to the nomination nearly impassable, he was already working a crowd in the college town of Huntington, West Virginia, home of Marshall University.

While Sanders, like Clinton, has talked openly about getting the country away from fossil fuels, his economic message of fairness resonated with West Virginia's white working class voters.

'It is not the coal miners' fault in terms of what's happening in this world,' Sanders said last Thursday during a visit to the state, according to the New York Times.

Sanders has pledged even more money – $41 billion – to turn West Virginia, and the rest of coal country, around.

'We have a moral responsibility to help working families in the fossil fuel industry find new jobs,' Sanders said when the plan was released in December.