Gordon Brown faces a daunting by-election in his own political backyard following the death yesterday of a Labour MP.

John MacDougall, the 60-year-old MP for Glenrothes in Fife, died after a two-year battle against the asbestos-related lung cancer, mesothelioma.

The Prime Minister, who visited Mr MacDougall in hospital earlier this week, led the tributes to a "good personal friend". Mr MacDougall's death leaves Labour facing a difficult by-election this autumn in the constituency next door to Mr Brown's Kirkcaldy and Cowdenbeath seat.

Following disastrous poll results in Glasgow East, and Crewe and Nantwich, another defeat in a previous Labour stronghold would intensify efforts to remove Mr Brown from No 10.

At the last election, Mr MacDougall held Glenrothes with 52 per cent of the vote and a 10,664 majority over the Scottish National Party, which would need a swing of 14.6 per cent to capture the seat. The SNP secured a 22 per cent swing to win Glasgow East three weeks ago.

Labour is expected to delay the by-election until late October or even November to enable its chosen candidate to become established in the area. But, given the collapse of the party's popularity in Scotland, Labour knows it faces an uphill struggle to hold on to Glenrothes. The poll will inevitably be viewed as a referendum on the embattled Prime Minister. He will attempt to shore up his position by setting out an economic recovery package next month and in his speech to the party conference in Manchester.

The weakness of Labour support in Fife was underlined two years ago when the Liberal Democrats captured Dunfermline and West Fife, also a previously safe seat, with a swing of 16 per cent.

Mr MacDougall was a former boiler-maker who became a union shop steward and long-serving member of Fife Council. He was elected to Parliament as an MP for Central Fife in 2001, which became Glenrothes when the boundaries of Scotland's parliamentary constituencies were redrawn four years later.

Mr MacDougall, who leaves a wife and two adult children, was diagnosed with mesothelioma two years ago and had a lung removed in an attempt to treat the condition. As his illness worsened, he was rarely seen at Westminister, but he was summoned from his sickbed in June to vote in favour of plans to detain terror suspects for up to 42 days. It was the first time he had voted in a Commons division for more than six months.

The Prime Minister said last night: "John MacDougall gave more than 30 years of distinguished public service to Fife – as a councillor, leader of the Fife Council, convener of Fife Council and then MP for Central Fife. He will be remembered as a true servant of the people.

"A very popular, diligent local MP, he served Fife with great distinction in all the roles he played. Over three decades, he has been a good personal friend of mine and I visited him on Monday."

Angus Robertson, the SNP leader at Westminster, said: "We may have been on opposite sides in the Commons, but John carried the respect of people right across the chamber and was passionate for the issues he believed in and the welfare of his constituents, which he cared about deeply. He will be much missed."

The former Liberal Democrat leader Sir Menzies Campbell, MP for the neighbouring North-East Fife constituency, said: "[John's] courageous fight against illness in recent times meant that Parliament was denied his shrewd interventions on so many issues."