Kim Leadbeater paid tribute to her family and friends after winning the seat previously held by her murdered sister Jo Cox.
Ms Leadbeater took the Batley and Spen by-election for Labour despite a strong challenge from the Conservatives.
She received 13,296 votes, a majority of 323 over Tory candidate Ryan Stephenson after a bitter contest. George Galloway, who targeted voters in traditionally Labour areas with the aim of toppling Sir Keir, came third.
As she looked ahead to serving as MP for the seat Ms Cox held until her murder in 2016, Ms Leadbeater said she could not have survived the past five years without the support of those close to her.
“There’s way too many people to mention by name, but I do want to refer to my family and my friends, who, without them, I could not have got through the last five years, never mind the last five weeks,” Ms Leadbeater said in her victory speech in Huddersfield.
“My amazing parents and my wonderful partner, and I want to give a special shout out to my niece and nephew who I cannot wait to hug as soon as I see them”, she added referring to the children of her late sister.
After taking the seat vacated by Labour’s Tracey Brabin becoming the mayor of West Yorkshire in May, Ms Leadbeater also thanked the police for their help during the hard fought campaign, without going into specifics.
“I want to say a huge thank you to the police who, sadly, I have needed more than ever over the last few weeks,” she said.
“And I want to say a huge thank you to the whole Labour Party team for the hours, and the time, and the commitment that they have put into supporting me and helping me to get to this fantastic result this evening.”
After the early morning declaration, Ms Leadbeater said after catching up on some sleep and “maybe having a few glasses of fizz” she would step into her work as soon as possible.
“I think the campaign has highlighted that there’s lots to do,” she said.
“But I’m going to crack on with it and I will do my very best to represent the whole of Batley and Spen as their new MP. I am absolutely delighted that the people of Batley and Spen have rejected division and they voted for hope.”