Since the beginning of the war, the British set up a naval blockade around all ports under German control to prevent war materials from reaching the Central Powers. The British also often stopped ships it suspected of carrying war materials to Germany. Germany said that this was illegal according to international law and that if Britain did not end it, Germany would attack ships heading for Britain using its submarine fleet. At first, Germany only targeted war ships, but within as short time it was attacking civilian and commercial ships as well.