Components in the outer wall of bacteria directly activate pain sensors, triggering immediate pain and inflammatory responses.
In bacterial infections, LPS fragments from damaged bits of the bacterial walls are released locally, triggering an immune response.
LPS insert in the membrane surrounding sensory nerve endings, inducing a mechanical deformation that is then sensed by TRPA1 proteins. This leads to activation of TRPA1 within a matter of seconds, the influx of positively-charged ions into the nerves and the firing of electric signals that are interpreted as pain by our central nervous system.
In addition, the influx of calcium ions through TRPA1 induces the release of factors that produce dilation of the blood vessels and tissue inflammation.