The Anglo-Soviet Agreement was a formal military alliance that was signed by the United Kingdom and the Soviet Union against Nazi Germany on July 12, 1941, shortly after the beginning of Operation Barbarossa, the German invasion of the Soviet Union. Both powers pledged to assist each other and not to make a separate peace with Germany. The military alliance was to be valid until the end of World War II. The two founding principles of the agreement of a commitment of mutual assistance and renunciation of a separate peace formed the basis of the later Declaration by United Nations.