Labour has held Birmingham Erdington in the by-election triggered by the sudden death of frontbencher Jack Dromey.
Former nurse and mother-of-five Paulette Hamilton, 59, won with a majority of 3,266 but the by-election failed to inspire voters, with a turnout of just 27%.
She picked up 9,413 votes, ahead of Conservative candidate Robert Alden with 6,147.
Her victory makes her the first black MP elected from a Birmingham constituency.
Ms Hamilton, whose father died just as her campaign got under way, thanked her Labour colleagues for their support “through four storms” and her bereavement.
She said: “I’d also like to say a special thank you to Kier Starmer for his endless support – even when my dad died, they were there, they wrapped me in cotton wool, and they supported me, and my dad isn’t even buried yet but they were there when I was crying.”
Trade union stalwart Mr Dromey held the seat for Labour in 2019 with a majority of 3,601.
Ukraine invasion: Priti Patel to meet Ukrainians trying to reach UK amid calls to extend visas to all fleeing war zone
MPs criticise UK response to Afghanistan crisis – as fears expressed same could happen in Ukraine
Ex-education secretary Gavin Williamson given a knighthood after being sacked twice
He was married to the former Labour cabinet minister and interim party leader Harriet Harman.
During tributes to Mr Dromey by MPs of all parties in the Commons on 2 February, Ms Harman spoke of “the total shock of his sudden death from heart failure” on 7 January.
Mr Dromey, who died in his Birmingham flat aged 73, was a lifelong trade unionist who rose to deputy general secretary of the Transport and General Workers Union, now part of the giant Unite union, in 2003.
He was treasurer of the Labour Party during the “cash for honours” allegations when Tony Blair was prime minister, and then became MP for Erdington at the 2010 general election.
He held a number of shadow ministerial posts, and as shadow immigration minister he spoke in a Commons debate on the problems facing Afghan immigrants to the UK on the day before his death.
A constituency in the northeast of Birmingham, Erdington has been held by Labour since it was created in 1974, although with just slim three-figure majorities in Margaret Thatcher’s election victories in 1979 and 1983.
One of 10 parliamentary constituencies in Birmingham, Erdington is also the seat in the city that voted Leave by the largest margin, 63% to 37%, in the 2016 European Union referendum.