What causes epididymitis?

The most common cause of epididymitis is infection, which can be caused by gonorrhoea or Chlamydia trachomatis infection due to unclean sex, or by the spread of a pre-existing urinary tract infection or inflammation of other adjacent organs.