Veteran MP Dennis Skinner has seen off a strong challenge from the Conservatives to hold on to the Labour stronghold of Bolsover.
He won 24,153 votes - 52 per cent of those who voted - but saw his majority cut by more than half to just over five thousand.
In a two horse race, the Conservatives polled 18,865 votes - 41 per cent of the 46,519 electors who cast their ballots.
The smaller parties saw their vote squeezed by the big two - with both the UKIP and Liberal Democrats candidates losing their deposits.
Overall turnout was 63 per cent - up slightly on the 61 per cent who cast their votes in 2015.
Speaking after the result was announced, Mr Skinner said he was ‘proud’ to have won the seat for a thirteenth time.
He said: “It has been a long campaign - we’ve done a lot of work.
“I go round every village to do meetings on street corners - I fight it like a marginal.
“I came into the contest way back in 1970 primarily because I was nominated by the miners.
“I had 21 years underground and I’m sure it held me in great stead because of the camaraderie down the coal mines.
“And I have had a lot of camaraderie since I became a member of parliament as well.”
Mr Skinner has now represented the traditional mining area for 47 years - winning at every parliamentary election since February 1970.
During the election, Conservative candidate Helen Harrison had high hopes of causing an upset.
However, despite winning almost 9,000 votes more than her party did two years ago, it still wasn’t enough.
She said: “I am really proud of the result we got here tonight - we worked our guts out on this campaign.
“I perhaps felt it was a bit closer than it actually was but to get that close to Dennis Skinner is something to be really proud of.
“I don’t know if we didn’t canvas enough or whether people changed their minds at the last minute.”
The Liberal Democrat candidate, Ross Shipman, was standing in his first parliamentary election at the age of just 27.
He got just under three per cent of the vote - but said the experience was still something he would cherish.
He said: “It is something to build on in the future - obviously national politics has taken its toll on this election.
“We’ll keep moving forward and hope we can get a better result in the future.”
In all, more than 90 per cent of the votes cast went to the two main parties.
UKIP, who pushed the Conservatives close for second place last time round, saw their vote plummet to just 2,129 - from more than 9,000 in 2015.