Vote-counting taking place across Britain

LONDON: Voters punished the opposition Labour Party in Scotland as the first results appeared Friday for local and regional elections across the United Kingdom.

The elections are being seen as a test of the popularity of the main party leaders only 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 be a high point in what is shaping up as a grim day for Labour, which was pushed to third place in Scotland — where it was once dominant.

The pro-independence Scottish National Party secured a third term in government in the county's parliamentary elections. But 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."

Voters are also electing legislatures in Wales and Northern Ireland, as well as choosing members of many English local authorities.