Gordon Brown's drive to recapture the political agenda with a programme of new laws to create "an opportunity-rich Britain" was badly shaken yesterday by a warning from the governor of the Bank of England that the economy is heading towards a recession.

"The nice decade is behind us," Mervyn King declared in funereal tones, warning that the economy was "travelling along a bumpy road" as he predicted rising prices would put a squeeze on take-home pay for millions of workers.

"As those price increases feed through to household bills, they will lead to a squeeze on real take-home pay, which will slow consumer spending and output growth, perhaps sharply," the governor said.

Unveiling his draft legislative programme of 18 bills offering people a greater say over schools, policing and health services in their area, the prime minister said Britain could avoid a recession. He even asked the public to "judge and test" him on the basis of his stewardship of the economy.

Brown promised: "We will see Britain through this difficult time. In the past we were first in and last out of a recession. In the last 11 years we have avoided recession and we will emerge from this world slowdown stronger and better, both as a country and a government."

Downing Street is increasingly pinning its hopes on a political recovery next year based on an economic upturn, but the Bank is predicting sharply rising inflation and slowing growth through to 2010.

King for the first time refused to rule out the prospect of a recession, saying that "one or two quarters" of falling output were possible as consumers suffered rising prices and the credit crunch. He blamed increasing food and fuel prices for the rising cost of living.

Even though the Bank's central forecast is for the economy to avoid an outright recession - defined as two consecutive quarters of negative GDP - King delivered a downbeat assessment of the prospects for 2008 and 2009, warning that growth would slip to around 1% by the end of this year while inflation would climb close to 4%. Fears of an inflationary spiral would limit the Bank's ability to ease the pain on consumers by cutting interest rates.

"The central projection is for growth to slow sharply in the near term, reflecting the squeeze on real incomes, before recovering as credit conditions begin to ease and the depreciation of sterling boosts exports and reduces imports," King said when unveiling the Bank's quarterly inflation report.

With voter disquiet at the state of their personal finances identified as a key reason for the government's unpopularity, King warned that family budgets could remain under pressure right up until the next election. "Real take-home pay has not risen by much in the past four years - by well below 1% a year. The next couple of years are going to see at least as great a squeeze on living standards that will erode purchasing power."

Brown's bills offered hope of a more prosperous Britain, he said, including flexible working rights for parents of older children and fresh action on failing schools.In a move to kick-start the property market, the housing minister, Caroline Flint, announced the creation of a £200m fund to buy unsold new homes and rent them to social tenants or make them available on a shared ownership basis.

The respected former Labour housing minister Nick Raynsford warned Brown he did not think the measures were adequate. Campaigners called the moves a "drop in the ocean".

Downing Street conceded yesterday's package and Tuesday's surprise £2.7bn family tax cuts, would not necessarily win the Crewe byelection next week. Labour officials sounded a cautiously optimistic note, suggesting private polling did not show the Tories had pulled away.