The Conservatives have held Calder Valley but with a vastly reduced majority.
Craig Whittaker, first elected MP for the seat in 2010, had been defending a majority of 4,427, having taken 23,354 votes (43.6%) in the 2015 General Election.
He took 26,790 votes, just 609 more than Labour candidate Josh Fenton-Glynn.
Mr Whittaker said: "It has been a tough fight and a rollercoaster of an election campaign.
The people of the Calder Valley have put their faith in me for a third time.
"Our majority has gone down but we have done incredibly well."
He said the Tories had done well in Scotland but elsewhere the results had not been consistent.
Labour candidate Josh Fenton-Glynn polled 26,181 votes.
He said Labour had cut the Tory majority in Calder Valley by 90%, adding: "It's quite clear the people of the Calder Valley want an MP who stands up for them.
"We have had a massive swing in our favour. I think we started off from a very difficult national situation."
In 2015, Fenton-Glynn had taken 18,927 votes (35.4%) The turnout in 2015 was 68.9%.The 2017 turnout was 73.6%.
The rest of the 2017 results were: UKIP candidate Paul Rogan received 1466 votes. Liberal Democrat canddidate Janet Battye took 1952 votes.
The Green candidate Kieran Turner got 631 votes. Independent candidate Robert Holden polled 1,034 votes.
Lancashire-born Mr Whittaker, 54, a married father of three who lives at Rastrick, said he was taking his team for a big Yorkshire breakfast to thank them for their hard work.
Mr Fenton Glynn, a poverty campaigner who was born and brought up in Hebden Bridge, said the Tory team had four paid workers whereas his team had to cope with a flood damaged office.