The SNP are set to take control of Midlothian Council after returning as the biggest party in the elections.
Both the SNP and Labour gained an extra seat as the Conservatives lost two, splitting the local authority with eight SNP, seven Labour and just three Conservative councillors returned.
Derek Milligan, who led the council's minority Labour administration, which had been in charge for the last five years despite not being the biggest party, said it would now be down to the SNP to decide what happens next.
READ MORE: Edinburgh council elections 2022 LIVE blog as voters wait for results to be announced
And he pledged to work with the newly elected administration, insisting Labour would not be "in opposition".
He said: "It's been a positive result for Labour, we have an additional seat. The Conservatives are paying the price for partygate. The anger felt by people over the breaking of the rules is clear.
"There will be discussions between the three parties to see what we can do but the SNP is the biggest party and we will be looking to them to take the lead.
"We do not intend to go into opposition like in Westminster. We will not oppose things just to oppose them.
"There are hard decisions to be made and we need to ensure we protect our services. Where we can find agreement we will work together and be pragmatic."
The SNP will now meet to discuss who will take over as their leader following the decision by Cath Johnstone to step down ahead of the election.
The full list of councillors elected are:
Penicuik ward
Debbi McCall (SNP) FIrst Preference vote (FPv) 1,639
Willie McEwen (Labour) FPv 1,234
Connor McManus (SNP) FPv 589
Bonnyrigg ward
Dianne Alexander (SNP) FPv 2,117
Derek Milligan (Labour) FPv 2,428
David Virgo (Cons) FPv 1,012
Dalkeith ward
Colin Cassidy (SNP) FPv 1.012
Stephen Curran (Labour) FPv 1,163
Margot Russell (Labour) FPv 816
Midlothian West Ward
Russell Imrie (Labour) FPv 1,645
Kelly Parry (SNP) FPv 1,126
Pauline Winchester (Cons) FPv 1,144
Midlothian East ward
Stuart McKenzie (SNP) FPv 1,045
Bryan Pottinger (Labour) FPv 1,473
Peter Smaill (Cons) FPv 1,106
Midlothian South ward
Douglas Bowen (SNP) FPv 1,005
Kelly Drummond (Labour) FPv 1,243
Ellen Scott (SNP) FPv 1,045
Full breakdown of the votes can be found at https://www.midlothian.gov.uk/info/799/elections_and_voting/726/local_government_election_2022