THRILLED Chris McCafferty was today back in her job as Calder Valley's MP.
The Labour candidate expected a hard fight - and it was.
Her majority was slashed by more than half to just under 1,400.
But it was enough to return her to the Commons for a third term.
A clearly relieved Mrs McCafferty, 59, said: "Quite frankly, I have been annoyed at the tone of some Tory leaflets and the misleading information put out by them.
"I would like to thank an electorate independently-minded to decide for themselves rather than be influenced by polls and newspaper adverts."
The constituency - which includes Brighouse and Elland - has proved a hard-fought Yorkshire marginal seat for some years.
Labour took the seat from the Conservatives in 1997, but there was a slight swing back in 2001 and the experts predicted it would be a close contest this time.
A re-count was ordered before the result was finally declared around 3.40am this morning.
Mrs McCafferty said affordable housing had been one of the biggest issues on the doorstep.
"People are worried about where their families are going to live and how they will be able to afford it. It's a huge issue right across the constituency and I intend to chair a conference on it," she said.
The MP has lived in Calder Valley for 30 years and has earned a reputation as being on the left of the party.
She voted against the war in Iraq, against foundation hospitals and against student top-up fees.
"I never thought I was going to be Foreign Secretary. I shall continue to be someone who makes up their own mind," she added.
The birds were chirping and it was coming light when the result was finally read out at North Bridge Leisure Centre in Halifax.
Candidates gave up traditional speeches made at election declarations, with Mrs McCafferty saying "Let's just go home".
Calder Valley was Conservative Donald Thompson's stronghold for almost 20 years before Mrs McCafferty took it for Labour in 1997.
With Calder Valley at number 41 on the Conservative hit list, she faced a close contest this time.
Tory hopeful Liz Truss, 29, was selected only at the beginning of the year when prospective Parliamentary candidate Sue Catling was ousted after bitter in-fighting.
But she denied the fallout had stuck in voters' minds and cost her the seat.
"It just hasn't been an issue on the doorstep. People have been worried about hospitals, schools and crime on the streets," she said.
"We fought a good campaign. We were close."
Pundits had said the Calder Valley result would be a key indicator of the success of the Conservative campaign.
Liberal Democrat Liz Ingleton - a former Mayoress of Calderdale - was third with just over 9,000 votes.
Ms Ingleton said: "We have done very well and this stands us in good stead for next time."