Term: inadvertently
Example: [neighbor] - i just thought i'd stop in to say [happy birthday] to your dog, but i inadvertently ended up [having sex] with your [wife]
Definition: accidentally and without intention