The American legal system was shaped during the period when the colonies were governed by England. Each of the original 13 colonies had its own government and colonial governor and answered independently to the Crown. With the Declaration of Independence, they became separate nations with complete control over their legal affairs. They first joined together under the Articles of Confederation to fight the Revolutionary War. This was a very weak federation because the colonies did not want to give up any of their powers. They came close to losing the war because the central government could not force the individual colonies to provide troops and supplies. This experience caused the colonies to realize that they could not stand against the European powers without a stronger central government. The result was the U.S. Constitution, in which the federal government was given the power to deal with foreign governments and to resolve disputes between the states. The states retained many powers, including the right to run their state governments with only limited interference from the federal government. Although the federal government has inexorably increased its power at the expense of the states, the states still retain substantial power, especially in regard to public health delivery.