Ed Miliband has overturned a narrow Tory advantage to take a commanding seven point lead after a bruising week for David Cameron in the wake of the resignation of Baroness Warsi over the Gaza crisis, according to a new Guardian / ICM poll.

In a boost for Labour, which is embarking on a pre-election summer campaign called The Choice, the party has seen its support increase by five points over the last month to 38%, a share it last recorded in March. The Tories see their support fall by three points to 31% – last recorded in June – giving Labour a seven-point lead. In last month's Guardian / ICM poll the Tories had a one-point lead over Labour – 34% to 33%.

The Liberal Democrats are unchanged on 12%, while Ukip sees a one-point increase in its support to 10%.

The poll, carried out between Friday and Sunday, followed a difficult week for the prime minister after Warsi resigned from the government after criticising the prime minister for his "morally indefensible" decision not to criticise Israel for disproportionate action in Gaza. On Wednesday Boris Johnson signalled his intention to return to parliament at next year's general election, placing him in a strong position to replace the prime minister.

The London mayor is the dominant figure in the race to succeed Cameron, according to the poll which shows nearly a third of voters (29%) believe he should be the next Tory leader. Theresa May, the home secretary who is seen as the current frontrunner, has the support of just 14% of voters. George Osborne, the prime minister's preferred candidate, is in third place on 6%. Jeremy Hunt, the health secretary who is seen as a leadership contender, is on 2% – the same level as the chief whip Michael Gove who is one of the chancellor's strongest supporters.

The strong support for Johnson feeds into the party standings. The poll finds that Labour's seven-point lead would fall to three points if he led the Tories. The Tories would see their support increase by three points under a Johnson premiership to 34% while Labour would see its support fall by one point to 37%. Johnson would also hit support for Ukip,. which would see its support fall by two points to 8%.

The impact of a Johnson premiership on the Ukip vote is likely to be seized on by his eurosceptic supporters who applauded the London mayor's declaration last week that Britain should have nothing to fear outside the EU. But Downing Street will argue the prime minister's tough stance towards the EU has already dented Ukip support. In last month's Guardian / ICM poll Ukip saw its support fall by seven points to 9%.

The poll is likely to settle nerves in the Labour party where Miliband has faced private criticism that he is failing to connect with voters. The Labour leadership will hope the findings will give the party a better hearing for its summer campaign which is designed to focus the attention of voters on The Choice between what it is calling the "Labour future" versus the "Tory theat".

The Tories are likely to reflect the poll may show the dangers of infighting in the run up to the general election. Downing Street made clear last week – in the days running up to the poll – that the prime minister was angry with Warsi after she announced her resignation on Twitter without informing him.

The announcement by Johnson that he would after all seek to return to parliament a year before the end of his final term as London mayor prompted a flurry of speculation about the future leadership of the Tory party. The prime minister welcomed Johnson's decision though supporters of Osborne are concerned about the threat posed by the mayor.

The poll will also raise questions about whether the prime minister succeeded in rejuvenating Tory fortunes when he promoted a series of younger female ministers in his reshuffle last month. The last Guardian / ICM poll was carried out on the eve of the reshuffle.

•

ICM Research interviewed a random sample of 1002 adults aged 18+ on 8-10th August 2014. Interviews were conducted across the country and the results have been weighted to the profile of all adults. ICM is a member of the British Polling Council and abides by its rules.