In pictures: A dramatic 24 hours in politics

Labour and the Liberal Democrats have won seats from the Conservatives in two out of the three by-elections held on Thursday, with the Tories narrowly retaining the third.

The by-elections, in Selby and Ainsty, Somerton and Frome and Uxbridge and South Ruislip were triggered by the resignations of all three sitting Conservative MPs, including former PM Boris Johnson.

Labour leader Keir Starmer said his party "can win anywhere" after Keir Mather overturned a Tory majority of 20,137 in the North Yorkshire seat of Selby and Ainsty to become the youngest MP in the Commons.

Image source, PA Media

Meanwhile in Somerton and Frome, Lib Dems' Sarah Dyke overturned a Tory majority of 19,000, following up on last year's by-election success in Tiverton and Honiton, and cementing the party's renewed vigour in the West Country.

Image source, PA Media

But PM Rishi Sunak says the forthcoming general election is "not a done deal" after the Tories narrowly held the London seat of Uxbridge and South Ruislip - with London's Labour mayor Sadiq Khan's contentious ULEZ (Ultra Low Emissions Zone) extension dominating the vote.

Image source, Reuters

Polls opened in the three constituencies - which spanned the length of England - at 07:00 BST on Thursday, including Uxbridge and South Ruislip, in west London, seat of former PM Boris Johnson.

Image source, AFP

Counting agents tallied the ballots throughout the night, after polls closed at 22:00 BST.

Image source, PA Media

Image source, Getty Images

Image source, Getty Images

The results came in during the early hours of Friday - bringing joy to some and disappointment to others.

Among the triumphant, Keir Mathers became the youngest MP in the House of Commons - aged 25 - winning in the North Yorkshire constituency of Selby and Ainsty, a previously safe Tory seat.

Image source, PA Media

In Somerton and Frome, the Lib Dems took the majority with Somerset councillor Sarah Dyke securing a convincing majority of 21,187 - leading to indisputable victory for Sir Ed Davey's party in another West Country seat.

Image source, PA Media

The Conservative Party kept their Uxbridge and South Ruislip seat, however, despite fears it too might be snatched by the Labour candidate.

In a recount, Conservative Steve Tuckwell narrowly won a majority by just 495 votes, despite a 6.7% swing to Labour.

Image source, PA Media

The by-elections also saw representations from other parties and independents, including independent candidate Count Binface in Uxbridge, and the Monster Raving Loony party in Selby.

Image source, PA Media

Image source, Getty Images

Candidates in Uxbridge staged an anti-ULEZ protest on stage after Conservative MP Steve Tuckwell won the seat - in what many argued was a one-issue contest.

The protesters included Leo Phaure (Independent), Kingsley Hamilton (Independent), Steve Gardner (Social Democratic Party) and Piers Corbyn (Let London Live).

Image source, PA Media

Following the announcement of the results, leaders of the three winning parties joined their respective candidates for a victory lap.

Prime Minister Rishi Sunak travelled to Ruislip to congratulate Steve Tuckwell.

Image source, PA Media

Labour leader Keir Starmer and deputy leader Angela Rayner were also seen travelling up to Yorkshire by train.

Image source, PA Media

And newly elected Liberal Democrat MP Sarah Dyke, alongside party leader Sir Ed Davey. was festooned with confetti from a fake cannon after winning the Frome seat.

Image source, PA Media

All photos subject to copyright.