Fruits, vegetables and whole-grains might be an unlikely treatment for asthma according to animal studies.
Tests on mice, published in the journal Nature Medicine, showed that a high-fibre diet could reduce inflammation in the lungs.
The extra fibre changed the nutrients being absorbed from the gut, which in turn altered the immune system.
The researchers argue the shift to processed foods may explain why more people are developing asthma.
The airways are more sensitive to irritation and more likely to become inflamed in people with asthma.
It leads to a narrowing of the airways that make it harder to breathe.
However, a possible solution may lie in another organ, the gut, and the bacteria which live there.
The cells of the human body are vastly outnumbered by the trillions of microbes that live in and on it.
There is growing evidence that these bacteria have a significant impact on health.
Gut bug fuel
A team at the University of Lausanne in Switzerland showed that the high and low fibre diets altered the types of bacteria living in the guts of the mice.
Bacteria which can munch on soluble fibre, the type found in fruit and vegetables, flourished on the high-fibre diet and they in turn produced more short-chain fatty acids - a type of fat, which is absorbed into the blood.
The scientists said these fatty acids acted as signals to the immune system and resulted in the lungs being more resistant to irritation.
The opposite happened in low-fibre diets and the mice became more vulnerable to asthma.
Their report argued that a dietary shift away from fibre in favour of processed foods may be involved in rising levels of asthma.
It said: "In recent decades, there has been a well-documented increase in the incidence of allergic asthma in developed countries and coincident with this increase have been changes in diet, including reduced consumption of fibre."
One of the researchers Dr Benjamin Marsland said some of the differences caused by high-fibre diets have already been observed in people by comparing diets in Europe and Burkina Faso.
He told the BBC: "There's a very high probability it works in humans, the basic principle of fibre being converted to short-chain fatty acids is known.
"But we don't know what amount of fibre would be needed and the concentrations of short-chain fatty acids required might be different.
"It is early days, but the implications could be far reaching."
The team in Lausanne are also investigating the role of diet in long-term lung inflammation such as COPD, which is set to become the world's third biggest killer.
An alternative to tweaking diets is giving the purified fatty acids themselves as a dietary supplement.
This worked in mice, but Dr Marsland warns there "certainly needs to be more work" before this is suggested in people.