In pictures: By-elections since 2010
The by-election in Richmond Park was the 28th since 2010. Here's how they all ended.
Oldham East and Saddleworth - 13 January 2011
The general election victory of ex-Labour minister Phil Woolas was invalidated after he was judged to have knowingly made false statements about his Liberal Democrat opponent, Elwyn Watkins, during the campaign. In the resulting by-election, Labour's Debbie Abrahams held the seat for the party, winning a majority of more than 3,500 and increasing the party's vote share to 42%.
Liberal Democrat Elwyn Watkins came in second and Conservative Kashif Ali third. UKIP's deputy leader Paul Nuttall placed fourth with 2,029 votes - 5.8% of those cast.
Barnsley Central - 3 March 2011
Labour MP Eric Illsley after admitting he fraudulently claimed parliamentary expenses, for which he was sentenced to a year in jail.
Dan Jarvis held the seat for Labour with a majority of 11,771, and 60.8% of the total vote.
UKIP's Jane Collins came second with 2,953 votes - 12.2% of the total. Conservative James Hockney placed third, while the Liberal Democrats' Dominic Carman fell to sixth, with 1,012 votes.
Leicester South - 5 May 2011
Sir Peter Soulsby resigned as an MP to compete to become Leicester's first directly elected mayor. Jonathan Ashworth held the seat for Labour with a majority of 12,078, and 57.8% of the vote. The Liberal Democrats' Zuffar Haq took 7,693 votes, while the Conservatives' Jane Hunt won 5,169.
UKIP's Abhijit Pandya came fourth, with 994 votes - 2.9% of the total.
Belfast West - 9 June 2011
Sinn Fein leader Gerry Adams announced he was going to resign as an MP in order to take up a seat in the Republic of Ireland's parliament.
Mr Adams was replaced by Paul Maskey, brother of Sinn Fein MLA Alex Maskey, who won with a majority of 13,123 and 57.1% of the vote.
Inverclyde - 30 June 2011
Iain McKenzie won the seat for Labour after the death of his predecessor David Cairns, but the majority fell from 14,416 in 2010 to 5,838. The SNP's Anne McLaughlin placed second, and the Conservatives' David Wilson third. Sophie Bridger, representing the Liberal Democrats, came in fourth.
UKIP's Mitch Sorbie was fifth with 288 votes - 1% of the total.
Feltham and Heston - 15 December 2011
The death of Labour MP Alan Keen triggered a by-election in which Seema Malhotra retained the seat for Ed Miliband's party, winning a majority of 6,203 and 54.4% of the vote. Conservative Mark Bowen was her closest competitor, taking 28%, while the Lib Dems just made it into third place with 5.9%. UKIP took 1,276 votes - 5.5% of the total.
Bradford West - 29 March 2012
Marsha Singh's resignation on health grounds led to one of the biggest political upsets of recent years, with Respect's George Galloway taking the seat from Labour, winning 55.9% of the vote and securing a majority of 10,140. Labour's Imran Hussein was pushed into second place with 25% of the vote, and the Conservatives' Jackie Whiteley was third with 8.4%. Sonja McNally, the UKIP candidate, took 1,085 votes - 3.3% of the total.
Cardiff South and Penarth - 15 November 2012
Labour's Alun Michael resigned to stand for the position of police and crime commissioner for South Wales. He was replaced by Stephen Doughty, who retained the seat for the party with a majority of 5,334, winning 47.3% of the vote. Conservative Craig Williams garnered less than half that total, while the Liberal Democrats' Bablin Molik placed third with 10.9% of total votes.
UKIP's Simon Zeigler was squeezed into fifth place by Plaid Cymru's Luke Nicholas, who came fourth.
Corby - 15 November 2012
When Conservative MP Louise Mensch announced she would resign from Parliament to move to New York with her family, Labour's Andy Sawford snatched the seat - Labour's first by-election victory over the Tories for 15 years. He took 48.4% of the vote in a 12.67% swing from the Conservatives.
The Liberal Democrats were pipped to third place by UKIP's Margot Parker, who won 5,108 votes - 14.3% of the total.
Manchester Central - 15 November 2012
Tony Lloyd was another Labour MP to opt to stand for police and crime commissioner, and he resigned from Parliament to run for that position in Greater Manchester.
He was replaced in Parliament by Lucy Powell, who held the safe Labour seat with a majority of 9,936 and 69% of the total vote to become Manchester's first female Labour MP. The Liberal Democrats' Marc Ramsbottom came second with 9.4%, and the Conservatives' Matthew Sephton placed third with 4.5%.
A mere four votes behind the Conservative candidate was UKIP hopeful Christopher Cassidy.
Croydon North - 29 November 2012
Labour MP Malcolm Wicks's death triggered a by-election easily won by Labour candidate Steve Reed, with 64.7% of the vote and a majority of 11,755. The Conservatives' Andy Stranack came a distant second with 16.8%.
UKIP's Winston McKenzie took 5.7% of the vote, with a total of 1,400 - pushing the Liberal Democrats into fourth place.
Middlesbrough - 29 November 2012
The death of the long-serving Sir Stuart Bell also saw a new occupant of a safe Labour seat. Andy McDonald retained Middlesbrough for the party with a majority of 8,211 and 60.5% of the vote.
UKIP's Richard Elvin came second with 11.8% of the vote, forcing the Liberal Democrats into third place the Conservatives into fourth.
Rotherham - 29 November 2012
Labour MP Denis MacShane resigned after he was found to have wrongly claimed expenses. The party held on to the seat, with Sarah Champion securing a majority of 5,318 and 46% of votes cast.
As in Middlesbrough, UKIP pulled into a second-place finish, with Jane Collins winning 4,648 votes for the party - 21.7% of the total.
Eastleigh - 28 February 2013
Chris Huhne's resignation after pleading guilty to perverting the course of justice led to some by-election success for Nick Clegg and the Liberal Democrats. The party's candidate Mike Thornton retained the seat for the party, with coalition partners the Conservative Party finishing third and Labour fourth.
UKIP came second, with Diane James winning 27% of votes cast, against the Liberal Democrats on 32%.
Mid Ulster - 7 March 2013
Northern Ireland's Deputy First Minister Martin McGuinness resigned from his role as an MP at the end of 2012. He was replaced as the Westminster representative of Mid Ulster by Sinn Fein's Francie Molloy, who won 46.9% of the votes and a majority of 4,681.
South Shields - 2 May 2013
The resignation of David Miliband, former foreign secretary and candidate for the Labour leadership, triggered a by-election in a seat held by Labour since 1935. The party's Emma Lewell-Buck won the seat with a 6,505 majority - down almost 5,000 from Mr Miliband's three years previously.
Big gains were made by UKIP, who finished second again, winning 24.2% of the vote.
Wythenshawe and Sale East - 13 February 2014
The death of Labour MP Paul Goggins triggered a by-election for the Labour seat he had held since 1997. The party's candidate, Mike Kane, won with a majority of 8,960, taking 55.3% of the vote.
UKIP's John Bickley - who would later stand for the party in the Heywood and Middleton by-election - came second, with 18% of the total vote. The Conservatives were pushed into third, and the Liberal Democrats came fourth.
Newark - 5 June 2014
Former Conservative MP Patrick Mercer resigned after he was suspended from the Commons for six months for allegedly asking questions in Parliament in return for money. He was replaced as MP for Newark by 32-year-old Conservative Robert Jenrick, who won 45% of the vote and a majority of 7,403.
The by-election was held in the wake of UKIP's victory in the European elections in May. Despite the hopes of Nigel Farage's party that the momentum from that win would help them triumph in Newark, the party's candidate, Roger Helmer, came second, with 26% of the vote.
Clacton - 9 October 2014
Douglas Carswell's announcement on 28 August that he was defecting from the Conservative Party to UKIP triggered a by-election in Clacton. The prospect of UKIP winning their first seat in the House of Commons led to huge media attention, with party leaders descending on the constituency to campaign in the last week before the vote.
In the end, Douglas Carswell won the seat comfortably with a majority of 12,404, giving Nigel Farage's party its first seat in Parliament. The Conservatives' Giles Watling came a distant second, with Labour third, the Greens fourth, and the Liberal Democrats falling to fifth.
Heywood and Middleton - 9 October 2014
The death of Labour's Jim Dobbin in early September triggered a by-election that was scheduled to coincide with the one in Clacton. Ed Miliband's party had held a healthy majority and was thought unlikely to lose.
As expected, Labour's Liz McInnes won the vote, but the night's big story was the close second-place finish of UKIP's John Bickley, with Labour's majority slashed from 5,971 to 617. The Conservatives and the Liberal Democrats trailed far behind in third and fourth.
Rochester and Strood - 20 November 2014
When Conservative MP Mark Reckless defected to UKIP, and resigned his seat in the Commons, he set in train a by-election in his Rochester and Strood constituency. Unlike Clacton before it, which had been won by Douglas Carswell, Rochester was way down UKIP's list of "winnable" seats at a general election.
Despite five visits to the constituency by David Cameron, who was campaigning for his party's candidate Kelly Tolhurst, Mr Reckless won the by-election with a majority of 2,920 votes.
Oldham West and Royton - 3 December 2015
Long-serving Labour MP Michael Meacher died, prompting the contest. The party's candidate, Jim McMahon, secured a 10,722-vote majority over UKIP's John Bickley, and a 62% vote share - higher than at the general election.
The Conservatives came third and the Liberal Democrats fourth.
Sheffield Brightside and Hillsborough - 5 May 2016
Labour comfortably held on to the seat, vacated after MP Harry Harpham died. His widow Gill Furniss ran for the party, gaining 14,087 votes, a majority of 9,590 and a 6% increase in Labour's share of the vote.
UKIP came second, followed by the Liberal Democrats and Conservatives.
Ogmore - 5 May 2016
Labour MP Huw Irranca-Davies stood down to run for the Welsh Assembly election, and was replaced by his party colleague Chris Elmore.
He won 52% of the vote, with UKIP second and Plaid Cymru third.
Tooting - 16 June 2016
Labour held the south London constituency in a by-election prompted by the departure of newly elected London Mayor Sadiq Khan.
Junior doctor Rosena Allin-Khan received 17,894 votes, winning with a majority of 6,357 over the Conservatives. The Green Party came third.
Batley and Spen - 20 October 2016
Labour's Tracy Brabin won with an increased majority for her party in the seat left vacant because of the murder of MP Jo Cox.
The other major parties opted not to stand, but a number of smaller parties - including the National Front and BNP - did.
Witney - 20 October 2016
The Conservatives held on, albeit with a reduced majority, after former Prime Minister David Cameron stood down as an MP.
Robert Courts won by 5,702 votes, with the party's vote share falling from 60% in 2015 to 45%, as the Liberal Democrats pushed past Labour into second place.