In sexually transmitted infections, it is important to differentiate a painful ulcer from a painless one. This is because painless ulcers are seen in the chancre of primary syphilis while painful tender ones are seen in Herpes and though rare, in chancroid (H. ducreyi).
I can guess that it must be due to peripheral nerves, but how does this happen?