British Prime Minister Theresa May's Conservative party fared better than expected in local elections in England, results on Friday showed, in her first test since losing her parliamentary majority last year.
The party held on to key London councils despite a big push by the main opposition Labour party, which failed to live up to its own hype.
It also scored highly in areas that voted in favour of Brexit in a 2016 referendum, while losing some ground in more pro-EU heartlands.
The UK Independence Party (UKIP), which has seen its support collapse since the 2016 vote for Brexit, was all but wiped out, while the pro-European Liberal Democrat party made gains.
Labour's leftist leader Jeremy Corbyn had sought to build on momentum from last year's general election, when an unexpected surge for his party deprived May of her majority.
But Labour admitted "mixed" results despite a difficult week for May, who was plagued once again by cabinet divisions over Brexit as well as a row over immigration that toppled one of her top ministers.
"We've done better than expected," Conservative party chairman Brandon Lewis told Sky News.
"We have seen Labour -- who thought they would be sweeping the board in London -- thus far not gaining a single council in London."
The Conservatives appeared to have benefited from the collapse of UKIP, which was instrumental in the Brexit vote but has since lost its way.
UKIP general secretary Paul Oakley denied his party was all but over, bizarrely comparing it to the Black Death plague which wiped out as much as a third of Europe's population in the 14th century.
"Think of the Black Death in the Middle Ages. It comes along and it causes disruption and then it goes dormant, and that's exactly what we are going to do," he told BBC radio.
"Our time isn't finished because Brexit is being betrayed."
On a victory tour in London, May said Labour "threw everything at it, but they failed", while adding: "We won't take anything for granted."
Labour's goal to win Conservative strongholds in London like Wandsworth or Westminster was always going to be hard, and it did gain seats.
Its failure to take Barnet, a northern suburb with a large Jewish population that was Labour's top target in the capital, is likely to be more heavily scrutinised in the context of an ongoing row over anti-Semitism in the party.
"I think there are lots of voters, Jewish people in London, who don't feel comfortable voting Labour," London's Labour mayor Sadiq Khan told the BBC.
Corbyn said he had secured a "solid set of results".
"Labour has won even more council seats than at our high watermark of 2014 and we are on course to secure our best results in London since 1971," he said.
Two Labour victories stood out: Labour lawmaker Dan Jarvis also won a mayoral election in Sheffield in northern England, while the party retained control of Birmingham council in central England.
But Matt Singh of Number Cruncher Politics noted: "Opposition parties are supposed to do well in mid-term contests, and these aren't the results of one that's about to storm the next general election."
The Conservatives held Kensington and Chelsea, where they had faced severe criticism over last year's devastating Grenfell Tower fire that killed 71 people, but with a smaller majority.
However, they lost the southwestern city of Plymouth to Labour and lost control of Trafford, its flagship council in northern England.
Foreign Secretary Boris Johnson pointed to the party's success in Brexit-voting areas, remarking that Corbyn's promise to keep Britain in the EU customs union "means he is not trusted to deliver Brexit".
The Conservatives also lost the strongly anti-Brexit London borough of Richmond upon Thames to the Liberal Democrats, which had courted EU citizens' votes.
The Lib Dems also won nearby Kingston-upon-Thames from the Conservatives.
Lib Dem leader Vince Cable, whose party has struggled in recent years after losing support for going into government with the Conservatives, said: "We are very much on the way back."