A supermarket could be fined £20,000 after losing a High Court challenge against environmental health officers.
The legal row was prompted by a shopper who saw a mouse eating chocolate at the Asda store in Lavender Hill, south-west London, in June 2005.
Wandsworth Council prosecuted Asda for four offences of breaching food hygiene regulations - but Asda's legal team said only three charges were necessary.
Having lost its High Court bid, Asda will be sentenced at the Crown Court.
Environmental health officers went to the store in June 2005 and "saw a mouse and partially-chewed confectionery in the same area, together with mouse droppings," said Lord Justice Maurice Kay.
The court heard how the kiosk area, shop floor, bakery area and lower warehouse were littered with dirt, food debris and mouse droppings, and shelves were contaminated by mouse urine and greasy smears.
Asda's legal team pleaded guilty at South Western Magistrates' Court and accepted there had been a breach of its general obligations to ensure food was protected from contamination.
The magistrates decided to send the case to the Crown Court for sentencing after deciding they had "insufficient powers" to impose an appropriate sentence themselves.
But sentencing was adjourned because Asda complained to the High Court that it should have been charged with only three, not four, offences.
Lord Justice Maurice Kay rejected the challenge and agreed all the charges were necessary "to reflect more accurately the full scope of Asda's culpability".
Each offence carries a maximum £5,000 fine.