A claim by the Home Secretary that an illegal immigrant could not be deported because of his pet cat is wrong, according to England's top judges.
Theresa May told the Conservative Party Conference that the ruling illustrated the problem with human rights laws.
A spokesman for the Judicial Office said the man's pet had had nothing to do with the judgement allowing him to stay.
Mrs May has since told the BBC that her speech had been checked for accuracy.
Addressing party activists in Manchester, Mrs May attacked what she said were excessive uses of Article 8 of the European Convention on Human Rights - the right to family life.
She said Article 8 had been used to prevent the removal of foreign national prisoners and illegal immigrants.
She said: "We all know the stories... about the illegal immigrant who cannot be deported because, and I am not making this up, he had a pet cat."
Within minutes, a spokesman for the Judicial Office at the Royal Courts of Justice, which issues statements on behalf of senior judges, said: "This was a case in which the Home Office conceded that they had mistakenly failed to apply their own policy - applying at that time to that appellant - for dealing with unmarried partners of people settled in the UK.
"That was the basis for the decision to uphold the original tribunal decision - the cat had nothing to do with the decision."
The case in question occurred in 2008 at the Asylum and Immigration Tribunal and involved a Bolivian student who had overstayed his visa. He said he should not be deported because he had a proper permanent relationship with his partner and should not be deported.
Barry O'Leary, the man's lawyer, said: "As part of [the] application and as part of the appeal, the couple gave detailed statements of the life they had built together in the United Kingdom to show the genuine nature and duration of their relationship.
"One detail provided, amongst many, was that they had owned a cat together for some time."
The couple provided evidence of their life together, such as bank accounts, social engagements and statements from friends.
The judge who dealt with the case at the first tier of the tribunal said: "I accept that the appellant and his unmarried partner have established family life. There is credible evidence to support this conclusions."
Much later in his judgement, he referred to a legal argument over the fact that the couple had a cat and whether that had any relevance to proving family life.
"The evidence concerning the joint acquisition of Maya (the cat) by the appellant and his partner reinforces my conclusion on the strength and quality of the family life that appellant and his partner enjoy."
So far so clear.
But that judgement was superseded by a decision of the upper tier of the tribunal.
That judgement at the upper tier, which allowed the man to stay, had nothing to do with the cat.
Lawyers for the Bolivian man told the senior judge in the upper tier that the Home Office had in fact ignored its own immigration rules on unmarried couples who had been together at least two years.
Those rules stated that an individual should not normally be deported if the relationship is clearly genuine and long-lasting .
The upper tribunal ruled in the Bolivian's favour - and said the Home Office's failure to follow its own rule was the key factor in the case, not the cat.
The lower court's findings automatically became immaterial because the case had been ultimately decided on entirely different legal grounds.
Mr O'Leary told the BBC the case has been repeatedly misrepresented in the press because a light-hearted remark by Senior Immigration Judge Gleeson was taken out of context.
The cat had become a moment of unintentional humour throughout the hearings - and the judge quipped that the cat "need no longer fear having to adapt to Bolivian mice".