Sometimes, accidents happen with safer sex. Condoms can tear or come off, for example. Sometimes they are simply forgotten in the heat of the moment.
If one partner is HIV-positive, it is possible for HIV to be transmitted. But there is no need to panic: in all probability, an HIV infection can still be prevented.
This is done by taking HIV medication for four weeks. The drugs prevent HIV from becoming established in the body. This treatment is called post-exposure prophylaxis, or PEP for short.
Important: PEP should be started as soon as possible after the "accident", ideally within two hours; otherwise within 24 hours if possible, and within 48 hours at the latest. It is debatable whether PEP can still be effective up to 72 hours (three days) after the possible exposure.