What impact have the elections had on the political maps of London, Scotland, Wales and England?

In London, Labour's Sadiq Khan defeated Conservative Zac Goldsmith to become mayor. Khan came out on top in three constituencies that had voted for former mayor of London Boris Johnson in 2012.

After second preferences were counted and transferred, Khan received a total of 1,310,143 votes (56.8%) and Goldsmith 994,614 (43.2%).

The Labour candidate gained 44.2% of first preference votes, with Goldsmith securing 35%. Green Party candidate Sian Berry came in third with 5.8%. Full details of London's results are available here.

The mayor has control over four major policy areas in London - transport, policing, environment, and housing and planning - and the London Assembly scrutinises the mayor's policies.

In the London Assembly election, Labour secured 12 seats while the Conservatives ended up with eight. The Green Party had the third most votes and have two seats in the Assembly, as do UKIP. The Lib Dems claimed the remaining seat.

What happened in Scotland?

The SNP will retain its grip on government, after having claimed 59 of the 73 constituency seats up for grabs - up six on their 2011 result. Overall, the SNP will occupy 63 of the 129 seats at Holyrood, with the Conservatives becoming the second-largest party on 31. Labour took 24, the Greens six (all from the regional lists), and the Lib Dems five.

Some of the SNP's gains came at Labour's expense in Glasgow, which now represents a clean sweep for the governing party. It also took Edinburgh Northern and Leith from Labour.

But it faltered elsewhere in the capital, losing Edinburgh Central to the Conservatives and Edinburgh Western to the Lib Dems. The Scottish Labour Party recaptured Edinburgh Southern from the SNP.

Party vote share by constituency

Your browser does not support this interactive content

As the interactive vote-share map above demonstrates, the Labour party's share of the constituency vote in Scotland was concentrated in areas where it largely failed to get over the finish line ahead of the SNP.

The SNP, on the other hand, dominated the count nearly everywhere in the country, winning more than 30% of the vote in all but three constituencies.

The Scottish Conservatives increased their share of the vote by more than eight percentage points, once again doing best along the border with England, but their strong performance in Aberdeenshire and Perthshire was enough to win them one constituency seat there too. With regional results factored in, the party gained 16 seats on the previous election in 2011 and will now be the second-largest party in the Scottish parliament.

That the Lib Dems doubled their constituency seat count, from two to four, masks a dismal night for the party, which lost its deposit in 48 constituencies.

For the first time since the parliament's creation in 1999, the Lib Dems are fifth in the political pecking order.

With six MSPs - one less than it had in 2003 but four more than the 2011 election - the Scottish Greens now stand as the fourth largest party in the Holyrood chamber. It won all of its seats through the regional list system and not through the constituency vote.

In Wales...

Labour is likely to seek to form a minority government after winning 29 of the 60 seats in Thursday's election, according to first minister Carwyn Jones.

Just one constituency changed hands, when Plaid Cymru leader Leanne Wood captured the Rhondda from the governing party.

The biggest shift in Welsh politics was the rise of UKIP, which has won seven regional seats.

Party vote share by constituency

Your browser does not support this interactive content

Although UKIP did not manage to clinch any constituency seats, the interactive map above shows the five places where it won more than 20% of the constituency vote: Merthyr Tydfil and Rhymney, Newport East, Islwyn, and Torfaen, where it came in second place, and Caerphilly, where it came third.

In three of these seats, UKIP's gains appear to have come mostly at Labour's expense, in one the losses were shared fairly evenly between Labour and the Lib Dems, and in one the Lib Dems lost out the most. The Conservatives also lost vote share in three of the five constituencies, but to a lesser extent.

And in England...

A total of 124 councils were up for re-election, in part or in whole.

After all the results were counted Labour lost 18 councillors, but held on to control of all but one of its 58 councils: Dudley, and gained control of Bristol.

The Conservatives lost a total of 48 council seats. The party lost control of two councils, but gained control of Peterborough.

The Lib Dems gained 45 councillors in total, and won back Watford council from no overall control.

UKIP gained 25 more council seats - but was not able to convert these gains into control of any council.

Local council results

Where did people turn out to vote?

At 68.3%, turnout was highest in Scotland in the battle for Eastwood, a constituency to the south west of Glasgow, in which the Conservatives ultimately prevailed over Labour. It was lowest at 42.9% just 20 miles up the road in Glasgow Provan, where the SNP delivered a drubbing to Labour.

Constituency turnout in Scotland

Your browser does not support this interactive content

In general, turnout was significantly lower in Wales, but it was highest at 56.8% in Cardiff North where Labour won with about 45% of the vote and Brecon and Radnorshire where the Lib Dems took more than half of the vote.

The biggest increase in turnout in Wales was in the Rhondda, the only constituency seat that changed hands.

Constituency turnout in Wales