Downing Street is wrestling with a dilemma over how to respond after a close ally of David Cameron was alleged to have described Tory activists as "mad, swivel-eyed loons".

In remarks immediately seized on by Nigel Farage, the Ukip leader, the senior Tory said that the party's MPs have to rebel against the leadership because they face pressure from hardline associations.

Farage, who knows the identity of the Tory, tweeted: "If you are a Conservative supporter who believes in Ukip ideas then your party hates you. Come and join us."

The senior Tory made the remarks – in earshot of journalists – after being asked about the decision of 116 Tory MPs to defy the prime minister and vote in favour of an amendment regretting the absence of a EU referendum in the Queen's speech.

The Conservative said: "It's fine. There's really no problem. The MPs just have to do it because the associations tell them to, and the associations are all mad, swivel-eyed loons."

Downing Street faced pressure on Friday evening because the Tory has been well known to the prime minister for many years and is due to play a significant role in the party's preparations for the general election. The Times, Daily Telegraph, the Daily Mirror, who all reported the remarks and who know the identity of the Tory, declined to name the senior member of the prime minister's circle.

The publication of the remarks, which were made during the week while the prime minister was in the US, is particularly embarrassing for Cameron. They come after No 10 aides expressed fury with Philip Hammond, the defence secretary, who criticised the government for devoting so much time to the gay marriage legislation.

Downing Street aides are relaxed about Tory MPs, including ministers, voicing opposition to gay marriage because it is a free vote. But they felt that the defence secretary crossed a line when he criticised No 10 for devoting so much parliamentary time to the issue. This was regarded as a deeply hostile act and fed suspicions that Hammond is looking to become chancellor in a post- Cameron government or even to make a play for the Tory leadership.

But No 10 has a more immediate crisis after the name of the Tory who criticised Tory activists was running in Westminster circles on Friday evening. The senior figure is expected to be named on Saturday.

Downing Street, which knows the name of the Tory, declined to comment on Friday evening. But Farage is planning to exploit the embarrassment when the Tory is named.

The Ukip leader is planning to say: "This person is an excellent recruiting sergeant for Ukip. If constituency chairman or district chairmen of the local Conservative associations feel uncomfortable, now is a good time to leave the party.

"These comments and Ken Clarke's description of Ukip as clowns shows the contempt they have. They even hate their own side. There will be a warm pint of bitter awaiting those who come over."