The winning candidate in the Peterborough by-election said her victory shows voters are more concerned about local issues than Brexit.
Labour’s Lisa Forbes said her campaign focused on public services rather than national politics.
“I campaigned on a message of hope, for a better deal for our city,” she said.
“Better resources for our schools, cleaning up the city of fly-tipping and getting more police back on our streets – local issues.”
The Labour leadership said the by-election showed voters’ dissatisfaction with the Government.
Both leader Jeremy Corbyn and shadow home secretary Diane Abbott said Peterborough had “rejected Tory austerity”.
Mr Corbyn added: “This result shows that despite the divisions and deadlock over Brexit, when it comes to a vote on the issues that directly affect people’s lives, Labour’s case for real change has strong support across the country.”
Nigel Farage said he was pleased with the performance of his Brexit Party, which came second with just 683 fewer votes than Labour.
He said that while Brexit was important, Labour won because of its infrastructure in the constituency.
“By any measure, Brexit is the defining issue of our age,” Mr Farage told the BBC.
“Labour won because they have data. Labour won because they know who their voters are in this constituency and they managed to turn enough of them out.”
Mr Farage said he would “talk more broadly” about national issues in the lead-up to a general election, when he said the Brexit Party would issue a “contract with Britain”, rather than a manifesto.
“The word manifesto sounds like a swear word to me,” he said.
“Basically it’s a document of lies that Labour and Tories produce at every election without any intention of delivering on it.”
Tory chairman Brandon Lewis said he was disappointed with the result, which saw his party drop to third place, but he pointed to a precedent of incumbent governments losing by-elections.
“Not winning any election is disappointing to me,” he told Sky News.
“But the reality is, we’re nine years into a Conservative Government, and I think you’ll find no government in history has ever won a seat from the opposition nine years into government.
“That’s the reality of it. It’s always a tough backdrop to be fighting a by-election, particularly one where we’re coming through that European election with the results we saw there.”
Stewart Jackson, a former Conservative MP who held the Peterborough seat for 12 years between 2005 and 2017, said: “Well done (Tory candidate) Paul Bristow and (Brexit Party candidate) Mike Greene.
“Both showed grace and courage. Having fought six general elections I know how hard it is to lose. Peterborough Conservatives can and will win the general election.”
Jess Phillips, MP for Birmingham Yardley, said she could not be “gleeful or proud” at Ms Forbes’s election because of anti-Semitic content the new MP had “liked” on social media.
Ms Phillips tweeted: “Woke up to news of Peterborough win.
“Glad that Brexit Party didn’t win and am in awe of my Labour colleagues who ran a tough campaign well.
“But the reality is I cannot be gleeful or proud as I’d want to be because of how it shows that antisemitism is becoming normal in the party.”
Ms Forbes drew criticism after she liked a video on Facebook with a caption that referred to Theresa May’s “Zionist slave masters agenda”.
She has since apologised and said she did not read the caption before liking the video.