Ukip will target at least 20 seats it believes it can win at next May’s general election in an attempt to hold the balance of power in another hung parliament.

Nigel Farage raised his party’s sights after Mark Reckless, the second Tory MP to defect to Ukip, held his Rochester and Strood seat in Thursday’s by-election with a majority of 2,920 over his old party.

Yesterday, both David Cameron and Ed Miliband came under pressure from their own parties to change their strategy to combat the growing threat from Ukip.

Labour was engulfed by accusations of losing touch with its working-class voters after the Islington South MP Emily Thornberry tweeted a picture of a house covered in England flags, but the Conservatives were also left soul-searching, having been confident at one stage of winning the seat.

“This result will increase the likelihood of [more Tory MP] defections and Ukip increasing its number of target seats,” said Matthew Goodwin, associate professor of politics at Nottingham University, who is writing a book on Ukip’s election strategy. “We are realistically looking at something like a 20-seat target campaign,” he added.

He said Ukip had learnt how to target its resources to maximise its chances under the first-past-the-post system. However, he believed Ukip may win only five to seven seats – even on a “good day”.

In pictures: Rochester by-election Show all 15 1 /15 In pictures: Rochester by-election In pictures: Rochester by-election Rochester by-election Counting gets under way for the Rochester and Strood constituency by-election held at Medway Park, Gillingham, Kent In pictures: Rochester by-election Rochester by-election Nigel Farage and members of the UKIP team celebrate after Mark Reckless won the Rochester and Strood by-election at Medway Park, Gillingham near Rochester, Kent In pictures: Rochester by-election Rochester by-election Howling Laud Hope, leader of the Official Monster Raving Loony Party (R) awaits for the by election results in Medway, Gillingham Rochester, Kent In pictures: Rochester by-election Rochester by-election Kelly Tolhurst, the Conservative Party's candidate in the Rochester's by-election, walks down the town's high street on polling day, in southern England In pictures: Rochester by-election Rochester by-election Gulpreet Baines (18) sets fire to a United Kingdom Independence Party (UKIP) rosette, on polling day in Rochester's by-election In pictures: Rochester by-election Rochester by-election Naushabah Khan, Labour Candidate for the Rochester and Strood by-election is joined by shadow transport secretary Michael Dugher in Rochester on the final day of campaigning ahead of by-election In pictures: Rochester by-election Rochester by-election UKIP supporter Graham Harper and his dog Roquie carry a electoral poster supporting UK Independence Party (UKIP) parliamentary candidate Mark Reckless in Rochester, Kent ahead of the by-election poll In pictures: Rochester by-election Rochester by-election A customer poll of sweets purchased in favour of the party's contesting the Rochester and Strood by-elecction on display in the Sweet Expectations Sweet Shop in Rochester, Kent, on the final day of campaigning before the by-election later this week In pictures: Rochester by-election Rochester by-election David Cameron and Conservative Party candidate for Rochester and Strood, Kelly Tolhurst, talk to Mick Parks, Workshop Foreman at MCL Mechanical near Rochester, Kent, southern England, during a visit ahead of the by-election In pictures: Rochester by-election Rochester by-election People stand holding placards against the Britain First party who held a march in Rochester, southeastern England In pictures: Rochester by-election Rochester by-election Britain First march through Rochester Justin Sutcliffe In pictures: Rochester by-election Rochester by-election UKIP parliamentary candidate Mark Reckless campaigns in Rochester on November 4, 2014 Rob Stothard/Getty Images In pictures: Rochester by-election Rochester by-election Ed Miliband campaigns with Yvette Cooper (left) and Naushabah Khan before the Rochester and Strood by-election Ben A. Pruchnie/Getty Images In pictures: Rochester by-election Rochester by-election The Britain First march was met by vociferous counter protest Justin Sutcliffe In pictures: Rochester by-election Rochester by-election A UKIP office in Rochester. Rochester and Strood will hold a by-election on November 20th following the defection of Conservative Party Member of Parliament, Mark Reckless to UKIP Rob Stothard/Getty Images

Ukip has set up a target seat committee, which is looking at dozens of constituencies. It is headed by Douglas Carswell, MP for Clacton, and Paul Sykes, the multimillionaire businessmen and Ukip donor.

Speaking in Rochester, a jubilant Mr Farage said: “We’ve made a few decision on which seats to target already. Can we do this in a few dozen seats? I think we can, yes.”

The Ukip leader conceded that he no longer expected any more Tory MPs to defect before Christmas. “I’d love it. But I don’t think people will defect immediately. I think they will sit and chew their teeth and have a think about things. I think defections are more likely after Christmas,” he said.

Ukip is carrying out polling in Tory-held constituencies in the hope of persuading the sitting MPs they would have a better chance of winning if they jumped ship.

Mr Farage revealed that Ukip plans to approach Tory MPs in Labour-Tory marginal seats outside London who were vulnerable at the election. “The Conservative Party is dying, literally dying in the urban North in the way it has in Scotland. [There is] a list of five Tory MPs who’ve got no chance of winning on a blue rosette but who might have a chance on a purple rosette, so let’s see what happens.”

Nigel Farage and members of the UKIP team celebrate after Mark Reckless won the Rochester by-election (EPA)

These MPs are understood to include Nigel Mills in Amber Valley, who has the 40th most “Ukip-friendly” of 650 seats in the UK. Martin Vickers in Cleethorpes is another MP under pressure from Mr Farage’s party, which won 41 per cent of the vote there in the European elections in May. David Nuttall, MP for Bury, also faces a significant threat from Ukip. As the head of the parliamentary “Better Off Out” group, which campaigns for withdrawal from the EU, he is an obvious target.

The Tories put a brave face on their defeat, arguing that the winning margin was less than Ukip had hoped for. Mr Cameron insisted: “I am absolutely determined to win this seat back at the next general election because anything other than a Conservative government will put our recovery at risk and Ed Miliband in Downing Street.” Privately, some Tory MPs admitted the defeat was a setback after their party threw the “kitchen sink” at the contest and Mr Cameron made an unprecedented five campaign visits.

Tory modernisers warned the Prime Minister he would lose the election if he aped Ukip. Ryan Shorthouse, director of the Bright Blue group, said: “Cameron should stop fighting on Ukip’s agenda, trying to sound tougher on immigration and the EU. Being Ukip-lite only helps Ukip.”