Prime Minister Tony Blair sidestepped electoral catastrophe Friday but voters handed the outgoing leader a string of bruising municipal defeats -- and his governing Labour was locked in a battle for Scotland with a nationalist party that vowed to push for independence.

Early results from Thursday's vote suggested Blair -- who has said he will formally announce next week that he will resign as prime minister, likely by July -- averted a predicted routing, but had lost hundreds of seats on local councils.

A tight contest in Scotland, where Labour has won every election for the last 50 years, saw the Scottish National Party -- which has pledged a referendum on independence by 2010 if it wins power -- gaining ground as officials continued to count ballots.

Around 10,000 local council seats were contested in Thursday's elections in areas of England outside London. In Scotland, voters chose their local representation as well as the Scottish Parliament, which sits in Edinburgh and deals with Scotland-only issues. And in Wales, voters elected their national assembly, located in Cardiff.

Blair has claimed three national poll victories since 1997 -- unprecedented for Labour -- but some activists concede the unpopular Iraq war and a domestic cash-for-honors scandal have made him an electoral liability.

With results from 130 of 312 English councils counted, Labour lost control of five councils, while the opposition Conservatives gained control of 15 more, to a total of 60. The third-place Liberal Democrats lost control of 106 seats but still controlled nine councils.

"A great set of results and I think we can really build on them and really go forward, and I think that's exciting," Conservative leader David Cameron said Friday morning.

After 52 of 60 Welsh assembly seats were declared, Labour had lost 3 but remained the largest party.

In Scotland, with 67 of 129 parliamentary seats called, Labour had lost 7 seats and the Scottish National Party gained 10.

Elections officials said they planned an investigation into tens of thousands of spoilt ballot papers recorded in Scotland, fearing people may have been confused by a complex voting system.

"Overall, what we're seeing are the midterm blues," former Foreign Secretary Jack Straw, watching ballots being counted in the town of Blackburn in northern England, told British Broadcasting Corp. television. "That's just a fact of life."

Labour's performance was marginally improved on results in 2006 local elections and better than polls had suggested -- though still among its worst-ever election performances.

Britain's opposition Conservatives, led by the youthful Cameron, made some advances -- but failed to gain a single council seat in the northern city of Manchester, deemed a key test of the party's revival and ability to win favor in Labour's traditional heartland.

In 1970, Conservatives held 62 parliamentary seats in the north, compared with 19 following the 2005 general election.

Leighton Vaughan Williams, political analyst at Nottingham Business School, said the Conservatives had not shown enough progress to suggest they would sweep the next national poll -- expected in 2009.

Treasury chief Gordon Brown -- Blair's likely successor -- had some cause for optimism, Williams said. "Margaret Thatcher's Tories used to suffer hellish beatings in midterm local polls in the 1980s," he said. "But every time, they stormed back to victory in national elections."