The Articles of Confederation and Perpetual Union, customarily referred to as the Articles of Confederation, was the first constitution of the United States of America and legally established the union of the states. The Second Continental Congress appointed a committee to draft the Articles in June 1776 and sent the draft to the states for ratification in November 1777. The ratification process was completed in March 1781, legally federating the sovereign and independent states, already cooperating through the Continental Congress, into a new federation styled the "United States of America". Under the Articles the states retained sovereignty over all governmental functions not specifically relinquished to the central government.
Maryland was the last holdout; it refused to go along until Virginia and New York agreed to cede their claims in the Ohio River Valley. A little over three years passed before Maryland's ratification on March 1, 1781.
More at Wikipedia