Because both gonococcal and nongonococcal urethritis are caused by bacteria that can be transmitted during sexual intercourse, you can prevent these infections by:
Not having sex
Having a sex with only one uninfected partner
Consistently using male latex condoms during sexual activity. If you or your partner has a latex allergy, use polyurethane condoms.
Having sexually transmitted urethritis may increase your risk of HIV infection. If you already have HIV, urethritis may increase the risk that you will pass HIV to a sex partner.
Urethritis caused by injury or chemical irritation is rare, and there is no way to prevent it. Once it occurs, avoiding the offending substance should prevent urethritis from recurring.