LONDON (AP) -- Voters punished the opposition Labour Party in Scotland as the results rolled in Friday for local and regional elections -- races that underscored divisions in the public mood across the United Kingdom.
The elections demonstrated the complexity of British politics in the final weeks before Britons vote in a critical referendum on whether the country should remain in the European Union. The strength of opposition leader Jeremy Corbyn is particularly under scrutiny, as the races were the first nationwide poll since he took over as leader.
The most closely watched race is for mayor of London --- an election that may give the capital its first Muslim leader. Sadiq Khan, a 45-year-old Labour lawmaker, is the favorite to replace Conservative Boris Johnson, after a race marred by American-style negative campaigning and allegations of extremism and fear-mongering.
Conservative candidate Zac Goldsmith, a wealthy environmentalist, has described Khan as "dangerous" and accused his opponent of giving "platforms, oxygen and even cover" to Islamic extremists ---a charge repeated by Prime Minister David Cameron and other senior Conservatives.
A victory for Khan would offer a bit of gloss to what is shaping up as a grim day for Labour, which was pushed to third place in Scotland --- where it was once dominant. The Conservative Party has become the main opposition --- an unprecedented situation.
The pro-independence Scottish National Party secured a third term in government in the county's parliamentary elections. They failed to secure a majority by only two seats.
SNP Party Leader Nicola Sturgeon told jubilant supporters that the voters showed trust in the party.
"The SNP has won a third consecutive Scottish Parliament election," she said. "That has never been done before in the history of the Scottish Parliament. We have tonight made history."
While Labour's losses in Scotland were humiliating, the party fared less badly overall than predicted. It held on to major cities in England including Birmingham, Newcastle-upon-Tyne and Sunderland.
Corbyn acknowledged that the party had "a lot of building to do" in Scotland, but was pleased with results in England.
"We hung on and we grew support in a lot of places," he said.
The results will do little to quell restive Labour lawmakers who think Corbyn's left-wing policies are a turn-off for many voters.
In Wales, which has traditionally been pro-Europe, the anti-immigrant UK Independence Party gained at least six seats in the Welsh Assembly.
Andrew Blick, a constitutional expert at Kings College London, said the results merely underscore how difficult the referendum campaign will be --- as attitudes nationally seem to be so complex.
"We don't know where the mood is," he said. "There are lots of different moods. What message do you push ahead with in the campaign when you have so many different opinions?"