A decision not to introduce badger culling in Derbyshire was "irrational" and came after the prime minister took a "personal interest" in the issue, the High Court has heard.
The National Farmers' Union (NFU) is challenging the ruling from September.
A judge heard the decision came after Boris Johnson's partner Carrie Symonds met the Badger Trust's chief executive in Downing Street.
Environment Secretary George Eustice said the challenge should be dismissed.
In a written case outline the NFU's legal team said: "What is apparent from the contemporaneous documents now disclosed is that the real reason for the direction was that from around 22 August 2019, the Prime Minister took a personal interest in the cull licensing decision."
The cull was set to go ahead in Derbyshire last winter in a bid to control bovine TB.
But in September the government said it would not grant the county's farmers licenses to do it.
Maya Lester QC, for the NFU, said Badger Trust chief executive Dominic Dyer was quoted in a newspaper saying he had "... every reason to believe this decision was taken as a direct intervention by the Prime Minister" following his lobbying.
However, Sir James Eadie QC, who is leading Mr Eustice's legal team, told the judge in a written case outline: "The decision was plainly not irrational."
He said the argument that "relevant factors" had not been taken into account but "irrelevant factors" had was "unsustainable".
Sir James said the idea there was "something sinister" about Mr Johnson's involvement was "unsustainable".
Farmers believe culling is necessary to control the disease that devastates the beef and dairy industries, but opponents say it is inhumane and ineffective.
Earlier this month the government announced it would be phasing out culling in favour of vaccinations.
Mrs Justice Andrews said she would produce a ruling in the near future.