Mary Creagh held on to her Wakefield seat.
In a close fought campaign the Labour MP has been retained the seat with a majority of just over 2,000.
The Conservative party was confident it could make inroads into the electorate after Ms Creagh uspet many of the city's voters by voting against article 50 earlier this year.
But it was a close result with Ms Creagh winning 22,987 votes and the Tory candidate Antony Calvert winning 20,811.
Ms Creagh said: "This has been an incredibly long campaign and has felt like a marathon. There was some difficult days.
"But my amazing campaign team and family pulled out all the stops."
Asked if she was confident ahead of the poll, she said "I felt I could not have done more. I knew I had done everything I could. As I was walking around today I said it felt like we were winning and we did."
A disappointed Mr Calvert said: "We have cut the majority and taken more than 20,000 votes, which is something we haven't done for a while.
"Naturally I am disappointed after the nature of the campaign we ran and for everyone who worked so hard.
"I was fully expecting to be on train on Monday heading to London with a parliamentary ticket."
The seat, which was also being contested by Liberal Democrat Finbarr Cronin, who won 943 votes, independent candidate Waj Ali who polled 367 votes and Lucy Brown of The Yorkshire Party who won 1,176 votes.
Ms Creagh has represented the area as an MP since 2005.
She won the 2015 general election by a majority of 2,613 votes.
Yvette Cooper successfully defended her seat of Pontefract, Castleford and Normanton seat with 29,268 votes.
She was standing against Andrew Lee, for the Conservative Party who won 14,769 votes, UKIP's Lewis Thompson who won 3,030, votes Clarke Roberts for the Liberal Democrats who won 693 and Daniel Gascoigne of the Yorkshire Party who won 1,431 votes.
In the Morley and Outwood seat Andrea Jenkyns managed to defend her seat.
She won 26,550 votes and narrowly beat Labour candidate Neil Dawson who took 24,446 votes.
Liberal Democart Craig Dobson won 1,361 votes
And in Hemsworth Jon Trickett regained his seat with a majority of more than 10,000.
He said: "This is my seventh time of being elected to the House of Commons and it still feels like the first. It's always exciting and a great privilege."
He added: "I am going to fight for our area, fight for Yorkshire and fight for our country."
He was up against Conservative candidate Mike Jordan, David Dews for UKIP, the Yorkshire Party's Martin Roberts and Joan MacQueen for the Liberal Democrats.
The Tories took 15,566 votes, UKIP won 2,591, The Yorkshire party won 1,135 votes and the Lib Dems won 912.
Mr Trickett won 25,740 votes.