They found that sugary proteins on the surface of some healthy gut bacteria train the immune system to fend off the malaria parasite.
Tests, in the journal Cell, showed the same sugary protein could be used in a vaccine to immunise mice against malaria.
It may explain why some people never catch malaria.
There is a vast community of bacteria living in the human gut that keeps us healthy.
A team of Portuguese researchers discovered that the Plasmodium parasite, which can cause malaria when it enters the bloodstream through a mosquito bite, has a sugary molecule on its surface that is also found on E. coli that live in the gut.
Experiments in mice showed that natural antibodies triggered by the bacterial sugar also attached to a similar version on the malaria parasite.
It sets off an immune reaction which stops the parasite from entering the bloodstream halting the infection in its tracks.
Further investigation with researchers from the US and Mali found that, in an area where the disease is endemic, people with the lowest levels of those antibodies were most susceptible to catching malaria.
The researchers said the reason why young infants are more likely to contract malaria may be because they do not yet have sufficient levels of these circulating natural antibodies.
They now want to see if a vaccine containing the sugar, known as alpha-gal, would work in humans, and particularly young children, as it seems to do in mice.
It is estimated that 3.4 billion people are at risk of contracting malaria. WHO data from 2012 reveals that about 460,000 African children died from malaria before reaching their fifth birthday.
Study leader Dr Miguel Soares said: "If we can vaccinate these young children against alpha-gal, many lives might be saved."
Dr Alvaro Acosta-Serrano, a lecturer at the Liverpool School of Tropical Medicine said it was an exciting idea and his team are looking into the role of alpha-gal in protection against Leishmaniasis.
"This may explain why some people are less susceptible to malaria," he said.
Friendly bacteria in the human gut can trigger a natural immune response against malaria, say researchers.