The Bridgend magistrates court heard Monday that Britain's leading retailer had been caught selling out-of-date goods at its Cowbridge Road superstore by fair trading officers on two occasions.
The firm was fined £7,000 and ordered to pay all legal costs after admitting the offences under 1996 food labelling regulations.
Officers found several fresh groceries past their sell-by date on sale at the store in March 2005, and issued a formal warning that Tesco acknowledged.
When inspectors called at the supermarket six months later they discovered further foodstuffs on display that were out-of-date.
Offending products included unpasteurised cheeses with warning labels highlighting the food was potentially harmful to pregnant women, children, the elderly and anyone with a low resistance to infection.
"This was a very serious case and hopefully the fine imposed by the court will highlight the need for all retailers to keep a close eye on use-by dates and ensure that supermarkets don't get it wrong in future," said Bridgend Council's trading standards head Peter Crocombe.
Foods found were between one and 21 days past their sell-by date, constituting a criminal offence under the Food Safety Act 1990 and subsequent amendments in 1996.
Bridgend Council is now urging all stores in the area to check the effectiveness of their stock rotation systems to avoid breaking the law.
It stressed "use-by dates appear on foods that are considered highly perishable and are likely, after a short period of time, to pose a danger of food poisoning when they go off. These foods need to be stored at low temperatures to maintain their safety rather than their quality."
Tesco could not confirm the precise reasons for its stock rotation failure, but a spokesperson told FoodandDrinkEurope.com that refresher training has been given to all staff at the Bridgend store on this issue.
"We have strict processes in place to prevent this sort of thing happening, but it seems that these processes may have broken down on this occasion. This is an unusual thing to happen," she added.