Scientists are developing a dipstick test to help people quickly spot if food is spoiled and could poison them.
Mouldy food is mostly undesirable
In under five minutes the dipsticks can check for the presence of chemicals emitted by disease-causing bacteria, a University of South Carolina team said.
A colour change from dark purple to red indicates food is on the turn, while a yellow result means food has perished.
The UK's Health Protection Agency said food that appeared fine to eat could harbour bugs the test would not spot.
The agency's Suzanne Surman-Lee cautioned: "You can't equate spoilage to the risk of getting food poisoning."
The university team showcased a prototype at an American Chemical Society meeting.
Unsafe to eat
When food begins to spoil there may be tell-tale signs, such as a foul smell or the appearance of mould.
But it is not always clear when foods become unsafe to eat.
Tests for specific bacteria that cause food poisoning generally require expensive, complicated kit and take hours or even days to give a result.
Instead, the disposable dipsticks detect compounds generated as the proteins in food are decayed by bacteria.
Preliminary tests on foods such as fresh salmon and both fresh and tinned tuna showed the dipsticks accurately spotted the presence of these biogenic amines 90% of the time.
Although many fruits and vegetables contain lower protein levels than fish and meats, the scientists say their studies suggest the dipsticks work on these foods too.
They now plan more detailed studies and are hopeful that the product will be available for consumers to buy in a few years' time.
COMMON FOOD CULPRITS
Food poisoning bacteria and where they are found
Campylobacter - milk and poultry
Salmonella - eggs, meat (especially poultry)
Clostridia - spores in food (especially meat)
Listeria - meat, dairy foods, fish and shellfish
They are also working to improve the speed, accuracy and sensitivity of the test.
Study leader Dr John Lavigne stressed that the dipsticks cannot indicate which specific food poisoning bacteria - such as salmonella or E.coli - are present.
Also, mould on some foods, such as blue cheese, is desirable.
Professor Hugh Pennington, emeritus professor of bacteriology at Aberdeen University, said the test might be more useful for food outlets than consumers.
A spokesman from the Food Standards Agency said the presence of biogenic amines usually indicated that the food product had been poorly prepared and stored.
He stressed: "A test of this sort must not be used instead of efficient storage and preparation techniques."
About six million people in the UK - 10% of the population - have a case of food poisoning each year. More than half are caused by bacteria.
Most people have mild symptoms and recover quickly, but some may develop more serious illness and require hospital treatment.