in violation of the Versailles Treaty, which denied Germany possession of submarines.
This happened as a result of Germany's non-compliance with the Treaty of Versailles, which specifically forbade them from possessing submarines.