David Cameron has been put on notice by anxious Tory MPs to improve his party's fortunes in this month's budget and the May local elections or risk a leadership challenge, after they suffered the humiliation of being beaten into third place by Ukip in the Eastleigh byelection.

As a Tory vice-chairman said that Ukip had "clearly connected with Conservative policies", a group of centre-ground MPs warned in private that they would hold back on any sort of leadership challenge to allow George Osborne to rejuvenate the government's fortunes in the budget on 20 March.

But the Tories are warning that if the budget plays poorly and Cameron presides over another poor performance in the local elections on 2 May, a large group of MPs are planning to call for a leadership contest by writing letters to Graham Brady, the chairman of the backbench 1922 Committee. A contest would be triggered if 46 MPs – 15% of the parliamentary party – wrote to Brady.

"If our poor performance continues, then there will be a problem," one senior Tory MP said. "Letters will start to be sent to Graham Brady. There will be trouble in May if things don't get better."

The warning of a move against Cameron came after the Tory vice-chairman, Michael Fabricant, highlighted in a series of tweets the alarm felt within the party at Ukip's success and concerns that the prime minister is abandoning Tory values. Fabricant, who was strongly involved in the Tory campaign in Eastleigh, tweeted: "The Conservative voice is muffled and not crisp. It does not clearly project Conservative core policies or principles."

Fabricant, who recently called on the Tories to form a pact with Ukip, tried to downplay the significance of the Ukip performance but immediately hailed the party's success in connecting with Tories. "If #Eastleigh is anything to go by – and it WAS just a @byelection and NOT a Gen Elec – Ukip clearly connected with Conservative policies!"

The intervention by Fabricant undermined Downing Street's two key aims of the day after the Tories were defeated by Ukip for the first time in a Westminster byelection – in a seat the Tories have needed to win to secure an overall parliamentary majority since it was created in 1955. No 10 wanted to play down the significance of the Ukip performance and to make clear that the prime minister would not abandon the centre ground.

Cameron said in Downing Street he was disappointed by the result but insisted that he would not move to the right to meet the Ukip threat. "I don't think we should tack this way, tack that way," he said.

He spoke out after Nigel Farage, the Ukip leader, hailed his party's success after it tapped into "revulsion" at the Tories, Lib Dems and Labour. Ukip came second as its share soared by 27.8 points with Diane James winning 11,571 votes.

Mike Thornton, the Lib Dem candidate, managed to hold on to the seat vacated by Chris Huhne with 13,342 votes, a majority of 1,771, in a result hailed by Nick Clegg as "stunning".

But the Tories suffered their worst byelection drubbing in years when Maria Hutchings trailed in third place with 10,559 votes. Labour's John O'Farrell came fourth with 4,088 in a result which raised questions about Ed Miliband's campaign to create a "One Nation" Labour party.

But the immediate focus was on the Tories as rightwingers called on the prime minister to reach out to traditional Conservative voters who felt "hurt" by social changes introduced by the government.

Eleanor Laing, a former frontbencher and close ally of the former defence secretary Liam Fox who is a strong opponent of equal marriage, told Radio 4's The World at One: "Social change should come about by evolution, not by diktat from the top of government. Sometimes I would put it as strongly as saying that it is hurtful, it is hurtful to people who want to believe in a Conservative party that represents them."

Conor Burns, a close friend of Margaret Thatcher who stood in Eastleigh in the 2001 and 2005 general elections, said: "This is what happens when your local organisation is allowed to wither and decay. You have a situation where, for 18 years, the Liberals have consistently pushed out their message to voters and so you have a constituency that does not have a single Conservative councillor at district or county level. We then attempted to unravel in three weeks the message that, for five times a year over 18 years, the Liberals have been pumping out in Focus leaflets."

The Tories warning of a potential challenge to the prime minister said that the budget on 20 March was now a key moment on which Osborne must focus on bread-and-butter issues. "The chancellor has to got to make sure there is a relentless focus on the cost of living and fuel duty," one senior Tory said. "That is what we should have done in Eastleigh. Instead we tried to out-Ukip Ukip by printing leaflets in their colours and portraying our candidate as a mini-me Ukip candidate.

"It's great to talk about issues Ukip likes, such as a referendum on Europe and immigration. But they have to be added value after you have made clear that the focus in on the cost of living because people out there are feeling real pain."

These views are echoed by dissidents who are planning to accelerate their timetable to challenge the prime minister after the Tories' poor showing in Eastleigh. In January a similar group of MPs warned of a threat to Cameron in 2014 unless he improves the Tories' standing. The Eastleigh result has moved that deadline forward.

One loyalist minister thinks it unlikely, though not impossible, that the prime minister will be challenged. "It is highly unlikely that there will be a leadership contest before the election. But it is not completely impossible."

But some of the dissidents believe that Osborne is making a special effort to reach out after he took questions on the budget from members of the 1922 committee for an hour last week. "George knows he has a lot of work to do," one minister said.