An international team of scientists has identified a set of genes that could make some people prone to meningitis.
The researchers compared DNA from 1,400 people with bacterial meningitis and 6,000 healthy individuals, Nature Genetics reports.
They found differences in a family of genes involved in the immune response seem to make people more or less susceptible to the infection.
They first scanned the whole genetic code of 475 British patients with meningococcal disease and 4,700 healthy individuals. In the end they found a clear difference in a small set of genes known to be involved in the immune system response.
When they looked again in two other European populations they found the same result.
The genetic differences found means that, in some people, the bacteria is able to evade the immune system and cause infection, while other people' immune systems are better equipped to fight it off.
The genes encode for a protein called factor H, and factor H related proteins.
Where there are flaws, the meningococcal bacteria is able to bind to these proteins to prevent the immune system from recognising it - almost like a Trojan horse - enabling it to get a foothold.
The researchers were looking at meningitis caused by the Neisseria meningitidis bacterium, which leads to swelling of the lining of the brain and blood poisoning.
It is not the first time researchers have attempted to find out if some people are more likely to catch meningitis because of their genetic make-up.
But results have previously been unclear, probably because of the small number of people studied.
It is hoped the findings will lead to the development of new vaccines.
Study author Professor Michael Levin, an expert in international child health at Imperial College London, said the findings would be particularly useful in developing a vaccine against meningitis B, which is now responsible for most cases in the UK.
There is already an effective vaccine against meningitis C.
"It seems that the genetic differences in factor H between people is what determines susceptibility or resistance.
"It suggests it may be an important protein to include in vaccines, and factor H is already one of the candidates for meningitis B vaccine."
He said the results will also help scientists better tailor vaccines to be effective in the whole population.
It may also open up avenues for improving treatment once people have bacterial meningitis, he said.