Gordon Marsden was re-elected for the sixth consecutive time as he retained Blackpool South for Labour - meaning he has now represented the seat for 20 years.
The constituency had been earmarked as among marginals nationally whose outcome would be a pointer to the national picture.
Gordon Marsden - Labour - 17,581
Peter Anthony - Conservative - 15,058
Bill Greene - Liberal Democrat - 634
Noel Matthews - UKIP - 1,339
John Warnock - Green Party - 341
But Mr Marsden held on with a majority of 2,523 votes ahead of Peter Anthony for the Conservatives.
It was an almost identical margin to 2015, when he had a majority of 2,585.
He said: “I am very privileged to have a great campaign team.
“The Conservatives poured huge amounts of money into the seat to try and take it, but the work my team have done, particularly the casework helping people with benefit issues has shown what we do for this constituency.
“Also, my work as a shadow minister has been a very important part of the process.
“It has been a very tiring and gruelling campaign for everyone, and a sad campaign also under the shadow of the terrible terrorist attacks.”
Mr Marsden added his success showed up the “deep failure” of the Conservatives and Theresa May “to try and run a one issue Brexit election.”
He said: “The flaws in her campaign and her governing party, whatever the outcome in terms of seats, have been very severely exposed.
“And it is a tribute to the positive campaign we have put forward nationally for renewal and the questions we have raised, including locally, to bring the Tory government to account.”
Peter Anthony said he was extremely disappointed to fail to get elected for the second time, and would now have to weigh up what went wrong.
He said: “I’m gutted, not just for myself but for Blackpool because Blackpool deserves better.
“A month ago I thought the seat was ripe for taking, so things have changed.
“I think the thought of a Labour government with Jeremy Corbyn and Diane Abbott is utterly terrible so I really don’t know why the Labour party gained more support.
“So I’m shocked with this result, and I’m sad for Blackpool because I put my heart and soul into it to try and turn the town around.”
UKIP finished in third place with 1,339 votes - but that was a huge drop from 2015 when the party won 5,613 votes.
Mr Marsden secured just over half the vote this time round, with Mr Anthony attracting 43 per cent.