The Conservatives have taken control of Southampton City Council away from Labour for the first time in nine years.
The Tories won the final seat by just 10 votes, to finish with 25 overall to Labour's 23.
The party also retained control of Hampshire County Council, with no change to its 56 seats.
Counting for the county concluded on Saturday after a fire alarm on Friday evening interrupted proceedings.
The alarm at River Park Leisure Centre in Winchester meant the building had to be evacuated.
The new leader of Southampton City Council, Dan Fitzhenry, said he felt "absolutely overwhelmed" after the result was announced.
He said: "I'd love to say a big heartfelt thank you to the people of this city who voted for us, and my team, and everyone else.
"It's a great achievement, we targeted seven seats to win, we won seven seats, and now we have a majority to get on and deliver, and get Southampton moving for the residents of our city."
Former council leader Christopher Hammond said: "It's a tough set of results and we are going to have to reflect on what has been said and where we go from here."
He said there were a number of factors behind the results, including "national circumstances".
Of the 78 seats on the county council, the Conservatives still hold 56, the Liberal Democrats have 17, Labour have three, the Whitehill & Bordon Community Party has one and an independent candidate has one.
Winchester city councillor Kelsie Learney tweeted a picture of people taking the ballot boxes into the car park on Friday evening.
"When the BBC said Winchester was one to watch we didn't think it would be due to a fire alarm!" she wrote.
When the BBC said Winchester was one to watch we didn't think it would be due to a fire alarm! Ballot boxes being taken to car park pic.twitter.com/ZLDxe1s40s— Kelsie Learney (@KelsieLearney) May 7, 2021
Elsewhere, for the seventh year running no single party won enough seats to take overall control of Portsmouth City Council, with the Conservatives now the largest party.
With 14 of the council's 42 seats up for grabs, the Liberal Democrats won the most with six, the Conservatives took five, Labour won two, and an independent candidate won one.
Fareham Borough Council, Havant Borough Council, and Rushmoor Council remain under Conservative control.
And while the Conservatives won 18 seats on Isle of Wight Council, 21 seats were won by other parties, so who will run the authority is not yet clear.
Its Conservative leader Dave Stewart also lost his seat to his Green Party rival Claire Critchison.
The leader of the Independents Debbie Andre said her team were "currently considering all of the options".
Meanwhile Liberal Democrat councillor and former Eastleigh MP Mike Thornton, who represented the Bishopstoke and Fair Oak division, lost his seat to independent borough councillor Louise Parker-Jones.