Shadow chancellor John McDonnell said Labour had enjoyed "remarkable success" across the country, despite the party suffering a dismal night at the polls in Scotland.
Mr McDonnell, supporting Labour candidates at the London Assembly count centre at Kensington Olympia, told the Press Association that coming third in Scotland, behind the SNP and the Conservatives, was "sad".
But he said there was real cause for optimism in the party, with Labour mayoral candidate Sadiq Khan favourite to follow Tory predecessor Boris Johnson to City Hall.
Asked about Labour's performance at the ballot box, Mr McDonnell said: "I think we've had a remarkable success.
"Pundits were predicting we'd be losing hundreds of seats and we haven't, in fact we have gained many.
"We've held on to councils we've targeted. It looks as though we're going to take London, we're going to take GLA (Greater London Authority) seats as well.
"So, no, overall I think the record's been impressive."
He added: "We are looking for a steady gain, year on year, and that's what we've done.
"We've increased the percentage of our votes almost certainly, people need to remember that we were 15 points behind the Tories last September, we've now overtaken them."
Commenting on the performance in Scotland, the party veteran said: "Scotland is sad, it will take us years to recover. But the party will rebuild."
Asked whether a victory for Mr Khan would threaten the leadership of Jeremy Corbyn, Mr McDonnell said: "He's worked together with Jeremy and myself to deliver this fantastic victory."