Image copyright PA

Both Labour and the Conservatives have suffered losses in the local elections, with voters turning to smaller parties and independents in a backlash against the Brexit deadlock. But beyond the immediate headlines lie smaller storylines you may have missed - here are seven of them.

1. The seat decided by chance

A poll on Hambleton Council was decided by lot - and the result saw Labour take its first seat there in more than a decade.

The seat, Northallerton South, was tied on 527 votes for Labour and the Conservatives - so the seat was settled by the returning officer choosing between two blank envelopes, one candidate's name in each.

Labour's Gerald Ramsden was the lucky winner of the draw.

Media playback is unsupported on your device Media caption Gerald Ramsden was elected after a dead heat in Hambleton.

2. Controversy in the Cotswolds

The Tories won the Tetbury Town ward by just one vote - after officials looked through the spoiled ballots and accepted one where the voter had put "Brexit" and an arrow to the Conservative Party candidate.

Stephen Hirst retained his seat in the Cotswolds town after defeating independent Kevin Painter by 232 votes to 231.

The Conservatives and the independents had been tied before the returning officer, who is in charge of overseeing elections, decided to settle the matter by using the rejected ballot paper.

Mr Painter has confirmed he contacted the Electoral Commission for advice and he will be taking legal action over the decision.

Cotswold District Council said it had consulted the guidelines in the Electoral Commission's booklet on doubtful papers and examples within election law books.

3. Jacob Rees-Mogg now lives in a Lib Dem area

Image copyright PA Image caption Jacob Rees-Mogg - represented by a Liberal Democrat

Leading Brexiteer MP Jacob Rees-Mogg now has a Liberal Democrat councillor representing him in Somerset.

Liberal Democrat candidate Dave Wood defeated Conservative Tim Warren, leader of Bath and North East Somerset Council, in the Mendip ward.

Wera Hobhouse, Lib Dem MP for Bath, tweeted: "Congratulations to Cllr Dave Wood, who moments ago beat B&NES council leader Tim Warren. He's now @Jacob_Rees_Mogg's local councillor!"

4. DUP candidate makes history

The Democratic Unionist Party's first openly gay election candidate has been elected.

Alison Bennington hugged supporters at a Belfast count centre for Antrim and Newtownabbey Borough Council.

She attracted 1,053 votes as part of her campaign for the pro-union and Christian party, and praised her supporters' "good, hard work and good teamwork".

The DUP's founder, the late Rev Ian Paisley, once led a campaign to, in his words, "Save Ulster from Sodomy" and prevent the decriminalisation of homosexuality.

5. Green surge 'helped by Extinction Rebellion'

Image copyright Reuters Image caption Has Extinction Rebellion led to a Green surge in the polls?

The Green Party has been one of the elections' biggest winners, picking up 265 seats - an increase of 194 compared to 2015.

With the local elections coming just after weeks of protests by Extinction Rebellion, should the environmental group be seen as having had an impact on voters' decisions?

Jonathan Bartley, the Green Party's co-leader, certainly thinks so.

He told the BBC he had "no doubt" the Extinction Rebellion group had contributed towards the party's election success, adding it was a "powerful force in building awareness of the urgency of climate change".

6. Maiden success for the Yorkshire Party

The little-known Yorkshire Party has won council seats for the first time in its history.

The party, which was set up in 2014 and campaigns for regional devolution (among other things), has previously had councillors defect to it - but had never actually won an election.

Now, the party has won six - with successes in both the East Riding of Yorkshire and Selby councils.

7. Political poetry

Image copyright Sinead Hensey

#Dogsatpollingstations proved such a hit on election day it has even emerged as a muse for professional poets.

Brian Bilston's effort, posted on Twitter, proved almost as popular as the dogs themselves.