A routine job carried out by environmental health staff working for Suffolk Coastal District Council has eventually led to Tesco being fined £17,000.
The supermarket chain was found guilty of eight offences relating to food safety regulations after council staff identified a number of problems at its Martlesham Heath store.
Environmental health staff discovered evidence of rodents at the store during an inspection in April 2007, together with cleanliness issues in the bakery and a lack of pest control measures around a waste compactor.
Tesco denied all the charges but, after a court case which began in May 2008, the retailer was finally found guilty this week, incurring the fine and being ordered to pay £57,000 in costs.
District judge David Cooper offered some words of support to the environmental health officers and other council officials involved in the prosecution.
"This was a big job and one that required quite a bit of courage to embark upon," he said.
Councillor Sherrie Green, cabinet member for community health, criticised Tesco's management for not reacting promptly to the concerns raised by environmental health staff after their first inspection.
She added that the store had made basic pest control errors, leading to a serious problem developing.