Tomatoes have a secret weapon to ward off insects.

Tomatoes

Tomatoes

The fruit contains an in-built defence mechanism that makes it taste worse when it senses an insect approaching.

A study conducted by researchers in Brazil discovered that a tomato is capable of sensing a nearby insect and sends electrical signals to the main plant to trigger a defence.

One of the defensive weapons is the production of chemicals, including hydrogen peroxide, to intentionally make the fruit less pleasant to eat.

The study saw electrodes added to tomato plants and the electrical signals changed when caterpillars were introduced and experts believe the findings will revolutionise how humans think of plants.

Study author Dr. Gabriela Niemeyer Reissig said: "What we found is that fruits can share important information with the rest of the plant."