The facts have changed, so I have changed my mind.

Until last week I expected the Conservatives to remain the largest party in next month’s election. Now the contest looks too close to call.

Today’s YouGov/Sunday Times poll, showing Labour 3% ahead, helps to explain why David Cameron may struggle to remain Prime Minister. It’s not just our voting intention figures. These are bound to fluctuate day by day. What our survey makes clear is that the Tories are currently losing both the air war and the ground war. Voters are warming to the idea of an Ed Miliband-led government, and Labour is contacting more voters in local constituencies.

Miliband’s personal rating has climbed to his best level for more than two years, albeit from a low base. Labour’s leader is regarded as more honest and in touch than the prime minister.

The Tories have failed to persuade voters that theirs is the party for “hard-working families”. Labour leads by ten points on this measure, and by 12 on one of the high-profile manifesto conflicts: which party would help parents most with child care.

Another Conservative commitment, to extend the right-to-buy to housing association tenants, has fallen flat. Voters oppose the idea by 52-39%

Ukip has halted the recent drift of support back to the Tories. If anything, Ukip’s support has firmed up in the past few days. This is bad news for Conservative MPs with small majorities over Labour.

Many voters are being turned off by the Conservatives’ campaigning tactics. Every day last week, many more people told us they had noticed something negative about the Tories than anything positive. With Labour, the two figures have consistently been in balance.

Separate YouGov research finds that up to Friday, Labour had contacted more voters locally than the Tories, in person, by phone, via leaflets and by email.

In the light of these factors, I have revised my forecast for May 7. I still expect a late shift to the Conservatives, with the safety of the status quo trumping the fear of change among voters who make up their minds late. Without that late swing, Labour would now be on course to be the largest party in the new House of Commons, despite facing huge losses in Scotland.

Taking account of the different voting patterns north and south of the border, and signs that Conservative MPs in marginal seats and some Liberal Democrats MPs will enjoy an incumbency bonus, my estimate puts the Tories just seven seats ahead of Labour. This is well within the margin of error.

Even if the Conservatives do remain the largest party, a result anything like my forecast would probably lead to Miliband becoming Prime Minister. Even if he could secure the support of the Lib Dems and around ten Ulster Unionists, Cameron would be able to count on 317 MPs, while Labour, the SNP and the smaller left-of-centre parties in England, Wales and Northern Ireland would have around 325.

On those figures, the Tories could not govern – but Miliband would need the tacit support of the SNP. A Labour-Lib Dem deal – either in the form of a full coalition or something looser – would not be enough. How the relationship between Labour and the SNP would play out would be one of the continuing dramas of the next parliament. The leaderships of the two parties won’t be doing behind-the-scenes deals; rather they will be playing a never-ending poker game.

That said, there is enough time for the parties to change voters’ minds. Plainly the Conservatives are paying the price for inept campaigning. By the same token, if they can now get their act together, they may be able to revive their fortunes, for the gap between the parties remains small. They need to exploit what is still their strongest card, their reputation for economic competence. (Despite putting deficit-reduction at the heart of its manifesto launch, Labour is still not trusted to manage the nation’s finances.)

Much depends on Cameron himself: he needs to re-establish a more commanding lead as the best man to run Britain. In three weeks’ time he, and we, shall know whether his epitaph will be that of a two-term prime minister, or the man who snatched defeat from the jaws of victory.

This commentary first appeared in the Sunday Times