A Staffordshire Tory MP has called for an electoral pact with the UK Independence Party, warning David Cameron that the party could lose out in many marginal seats at the next general election without the promise of an in/out referendum on EU membership.

Lichfield MP Michael Fabricant, a party vice chairman in charge of parliamentary campaigning, said it was "time to actively consider whether a rapprochement might be possible" to counter a rising tide of Eurosceptic public opinion.

In a starkly-expressed report to the Prime Minister, he concluded: "These steps have to be taken to stop the continued haemorrhage of Conservative votes."

Ukip leader Nigel Farage retorted that there could be "no deals with the Tories: it's war", blaming the Prime Minister's previous claims that the party was one of "closet racists".

"Cameron's comments over the Rotherham case mean a deal's simply not possible," he told Mr Fabricant on Twitter amid the controversy over children being removed from foster parents in the South Yorkshire town because of their Ukip membership.

Mr Cameron is resisting growing backbench demands for a straightforward referendum on whether Britain should remain a member of the European Union (EU).

He has signalled his readiness to hold a referendum on the EU but is opposed to an in/out alternative and was boosted by London Mayor Boris Johnson supporting that stance.

But Mr Fabricant said the idea must be considered because Ukip had become "a significant contributory factor in costing the Conservative Party victories in marginal seats".

"It is time to consider actively whether a rapprochement might be possible before the 2015 General Election," he said in the report, which he has published.

"The basis of any deal is clear: a referendum on the United Kingdom's future membership of the European Union."

The eurozone crisis and the attention on the future of the EU meant Ukip's message was "gaining traction with many, and fast", he warned, pointing to its third place at this month's Corby by-election.

An in/out referendum promise would mean the Tories had "taken the first step in being in tune with popular opinion... neutralised a Ukip threat and attenuated the politicking of the Labour Party on the European question".

He pointed to Mr Farage's previous statement that he would consider an electoral pact if he was given the promise "written in blood" of a public vote on EU membership.

Mr Fabricant said he recognised that the policy would be "unpopular with our Coalition partners and so the timing of any such declaration would be critical".

But he added: "Such an offer would not be a sign of weakness by the Conservative Party. It would be a pragmatic extension of existing philosophy from a party of Government.

"Moreover, this could mark the final rapprochement between warring brothers."

Mr Fabricant said he believed his party "might well" win the 2015 election without an agreement but "a pact with Ukip on clear terms" to stand aside could secure at least 20 more seats.

Ukip was not likely to win seats but could cost the Tories victory in key marginals, he said.

"I have had no contacts with Ukip. But we cannot ignore the maths," he wrote on Twitter.

And he was dismissive of the intervention by Mr Johnson when asked about the apparent conflict in their positions by an ITV news reporter on the social network.

"Errrr, what on earth has Boris got to do with it one way or another? He is mayor of London," he retorted.

Influential eurosceptic backbencher Mark Pritchard stepped up referendum calls yesterday, saying legislation for a vote should be introduced before the end of the parliament.

"This should be an in/out referendum - anything short of that simply won't deliver," he told the Telegraph.

But Mr Johnson said the prospect of Britain's withdrawal from the EU tomorrow was unappealing and a referendum could not be narrowed to "such a simple question".

The row came amid renewed hand-wringing about Britain's relationship with the EU after talks about the Union's next seven-year budget broke up on Friday without a deal.

Mr Cameron left Brussels warning Europe it must live in the "real world".

Another summit will now be held in the new year, by which time the EU's 27 members will hope to have narrowed their differences enough to strike an agreement in January or February.

In his report, Mr Fabricant warned: "At present, Ukip does not pose a threat in any single Westminster parliamentary seat: however, it presents a far more troubling threat to the Conservative Party."

At the 2010 election, Ukip votes of just 3-4% cost victory in between 20 to 40 seats, he suggested, "a major contributory factor to the Conservatives failing to win an overall majority".

That showed MPs were wrong to suggest Ukip was a "one-trick pony" that only performed well at elections to the European Parliament, he said.

"With a Ukip leader in Nigel Farage, who is a former Thatcherite, who sounds like a Conservative, who looks like a Conservative, and in other circumstances probably would be a Conservative, some of the arguments being advanced here do have real relevance and must be addressed," he said.

The party should conduct private polling to clarify how much of the marked increase in Ukip support was due to defections of previous Tory supporters, he said, though it would probably make "disturbing reading".

Corby, where Ukip polled 14.3% of the vote as Labour took back the seat vacated by Tory Louise Mensch, was a stark signal of "the real support that Ukip can harness", he said.

"In the 2010 general election, Ukip did not stand in the seat, yet since gained 14.3% of the vote just two years on."

Mr Fabricant urged Mr Cameron to promise an in/out referendum before Labour took advantage of the polls to make its own pledge, making his party "once again look like it was following rather than leading on the issue of Europe.

"Nevertheless, I recognise that any such move would be unpopular with our coalition partners and so the timing of any such declaration would be critical."

An in/out referendum would remove the threat from Ukip as it would be "finished as a political entity" if the public voted to withdraw and "unable to fight the obvious tensions of the European question within the Conservative Party for many years to come" if it went the other way, he said.

Mr Fabricant told Sky News: "There is not going to be any discussion for a good 24 months yet with Ukip, but I do think there needs to be a discussion in the Conservative Party."

Asked what the Prime Minister had made of his intervention on the topic, the MP replied: "I hope that he will simply consider it and look at that as part of a number of different strategies that he will be considering."

He added: "I'm seeing him tonight, so maybe he will tell me."

A Conservative Party spokesman said: "Michael Fabricant does a great job campaigning in by-elections but he doesn't speak for the party on this issue.

"The safest way to protect Britain's interest in Europe is to vote Conservative. That's why we'll have Conservative candidates in every seat at the next election."