Jeremy Corbyn has successfully passed his first electoral test as Labour comfortably won the Oldham West and Royton by-election.
Jim McMahon retained the seat for Labour with a majority of more than 10,000 despite Ukip's hopes of making a breakthrough.
The result will come as a major relief to Mr Corbyn who has endured a torrid week for his leadership following Labour splits over air strikes in Syria.
Turnout was higher than expected at just over 40%, and Labour's success appears to have been secured with an effective postal vote operation.
Ukip leader Nigel Farage branded the result "perverse" and said "serious questions need to be asked".
He claimed to have "evidence from an impeccable source that today's postal voting was bent".