Devil's advocating: I did exactly this several times in my sailing career. Military vessels are regulated by the same international laws and rules as all other sea navigation subjects.
Fellow sailor crossed the course of Turkish submarine while under sail (meaning he had a right of passage). It was in Turkey's waters (!) about 10 years ago. Instead of changing course they made an emergency dive exercise.
Fellow sailor crossed the course of Turkish submarine while under sail (meaning he had a right of passage). It was in Turkey's waters (!) about 10 years ago. Instead of changing course they made an emergency dive exercise.