Washington, D.C., was created to serve as the national capital from its inception. The Residence Act of 1790 required that the capital's territory would be located along the Potomac River within an area that Maryland and Virginia would cede to the federal government. However, it permitted the nation's first president, George Washington, to select the territory's precise location. President Washington then chose for the territory a square whose sides were in length and whose corners were directly north, east, south, and west of its center. The area of the square contained the existing towns of Georgetown and Alexandria, as well as two small villages, Hamburgh in the Foggy Bottom area and Carrollsburg near the confluence of the Potomac and Anacostia rivers.