By Carole Walker
Political correspondent, BBC News
John Mason's victory for the SNP has stunned Labour
This will go down as one of Labour's most dramatic by-election defeats ever and will send shockwaves through the party.
Glasgow East has returned Labour MPs to Westminster for almost 60 years, remaining solidly loyal despite huge industrial and social change.
Yet the SNP seized it with a swing of more than 22%.
If that were to be repeated at a general election, Labour would be left with just one MP north of the border. The prime minister and chancellor would be among those who would lose their seats.
Of course, by-elections are not the same as general elections. Voters do feel they have a greater freedom to register a protest vote when they are choosing one MP rather than their next government.
Yet this result is a hammer blow to Gordon Brown.
Ahead of the poll, depressed Labour MPs and some seasoned commentators were predicting that if Labour were to lose Glasgow East, Gordon Brown would be finished.
It is hard to see how he can recover his authority after this. Yet his instinct will be to plough on.
So what happens now? Almost certainly nothing at all until the party conference in the autumn.
MPs who fear that with Gordon Brown at the helm they are doomed to lose their seats at the next election still face the problem of what to do about it, given that there is no serious alternative waiting in the wings.
Labour candidate Margaret Curran failed in her bid to be elected
One crumb of comfort for the prime minister is that parliament has broken up for the summer. Some suspect it is no coincidence that Labour called the by-election two days after Parliament rose for the summer recess.
There will be no opportunity for MPs to huddle in corridors and discuss how he could be replaced.
But one Labour MP I spoke to predicted there would be a lot of mobile phone roaming from various beaches over the summer months.
Another told me that the party could not simply ignore a defeat like this and predicted that by the time of the autumn conference there could be some "shooting from the hip".
Why did Labour lose? It suffered a fatal combination of an unpopular prime minister in Westminster, a buoyant SNP which fought an upbeat campaign and a feeling of disillusion on the ground which meant many of its supporters simply stayed at home.
Much has been made of the grim statistics of this constituency - low life expectancy, high levels of unemployment, poor housing and health problems.
There have been some improvements, but many voters certainly do not feel they have benefited from 10 years of Labour in power.
For the SNP the result is the vindication of a campaign in which Alex Salmond loomed large.
Scotland's ebullient first minister came here 10 times over the course of the campaign and declared it was a test of strength between him and Gordon Brown.
Campaigners urged voters to use this by-election to send a message to the prime minister and ensure the voice of the East End of Glasgow was heard. The party clearly benefited from a protest vote.
The result was announced after a Labour-requested recount
There was little talk of the issue of independence.
This was a campaign that focused on the problems of the high cost of food and fuel and the call for the government in Westminster to give Scotland a bigger share of revenues from North Sea oil.
The SNP also made much of the deep-seated problems that remain in a constituency so long in Labour's hands.
In John Mason the party had a decidedly low-key candidate, but with the advantage of a solid track-record as a councillor in the constituency.
The Conservatives will be happy to have done better than expected in an area not known for its sympathy for the Tories, beating the Liberal Democrats into fourth place.
Many felt David Cameron had made a mistake in coming here during the campaign to talk about the "broken society".
But the party is keen to show there are no no-go areas for the Tories and that, under Mr Cameron's leadership, the party is serious about tackling some of the causes of social deprivation.
The Liberal Democrats will be disappointed at fourth place and a lost deposit.
By-elections are supposed to be something of a speciality for the Lib Dems and they won the last by-election in Scotland in Dunfermline and West Fife.
But the biggest loser could turn out to be Gordon Brown. It won't be easy for him to shrug off his third by-election defeat in three months.