tribes of the
Piscataway people (also known as the Conoy) inhabited the lands around the
Potomac River when Europeans first visited the area in the early 17th century. One group known as the
Nacotchtank (also called the Nacostines by
Catholic missionaries) maintained settlements around the
Anacostia River within the present-day District of Columbia. Conflicts with
European colonists and neighboring tribes forced the relocation of the Piscataway people, some of whom established a new settlement in 1699 near
Point of Rocks, Maryland.
Federalist No. 43, published January 23, 1788,
James Madison argued that the new federal government would need authority over a national capital to provide for its own maintenance and safety.
 Five years earlier, a band of unpaid soldiers besieged Congress while its members were meeting in
Philadelphia. Known as the
Pennsylvania Mutiny of 1783, the event emphasized the need for the national government not to rely on any state for its own security.
Article One, Section Eight, of the
Constitution permits the establishment of a "District (not exceeding ten miles square) as may, by cession of particular states, and the acceptance of Congress, become the seat of the government of the United States".
 However, the Constitution does not specify a location for the capital. In what is now known as the
Compromise of 1790, Madison,
Alexander Hamilton, and
Thomas Jefferson came to an agreement that the federal government would pay each state's remaining Revolutionary War debts in exchange for establishing the new national capital in the
Southern United States.
On July 9, 1790, Congress passed the
Residence Act, which approved the creation of a national capital on the
Potomac River. The exact location was to be selected by President
George Washington, who signed the bill into law on July 16. Formed from land donated by the states of Maryland and Virginia, the initial shape of the federal district was a square measuring 10 miles (16 km) on each side, totaling 100 square miles (259 km2).
Two pre-existing settlements were included in the territory: the port of
Georgetown, Maryland, founded in 1751,
 and the city of
Alexandria, Virginia, founded in 1749.
 During 1791–92,
Andrew Ellicott and several assistants, including a
free African American astronomer named
Benjamin Banneker, surveyed the borders of the federal district and placed
boundary stones at every mile point.
 Many of the stones are still standing.
federal city was then constructed on the north bank of the Potomac, to the east of Georgetown. On September 9, 1791, the three commissioners overseeing the capital's construction named the city in honor of President Washington. The federal district was named
Columbia, which was a poetic name for the United States commonly in use at that time.
 Congress held its first session in Washington on November 17, 1800.
Congress passed the
Organic Act of 1801, which officially organized the District and placed the entire territory under the
exclusive control of the federal government. Further, the unincorporated area within the District was organized into two counties: the
County of Washington to the east of the Potomac and the
County of Alexandria to the west.
 After the passage of this Act, citizens living in the District were no longer considered residents of Maryland or Virginia, which therefore ended their representation in Congress.
On August 24–25, 1814, in a raid known as the
Burning of Washington, British forces invaded the capital during the
War of 1812. The
White House were burned and gutted during the attack.
 Most government buildings were repaired quickly; however, the Capitol was largely under construction at the time and was not completed in its current form until 1868.
Retrocession and the Civil War
In the 1830s, the District's southern territory of Alexandria went into economic decline partly due to neglect by Congress.
 The city of Alexandria was a major market in the American
slave trade, and pro-slavery residents feared that
abolitionists in Congress would end
slavery in the District, further depressing the economy. Alexandria's citizens petitioned Virginia to take back the land it had donated to form the District, through a process known as
Virginia General Assembly voted in February 1846 to accept the return of Alexandria and on July 9, 1846, Congress agreed to return all the territory that had been ceded by Virginia. Therefore, the District's current area consists only of the portion originally donated by Maryland.
 Confirming the fears of pro-slavery Alexandrians, the
Compromise of 1850 outlawed the slave trade in the District, although not slavery itself.
The outbreak of the
American Civil War in 1861 led to expansion of the federal government and notable growth in the District's population, including a large influx of freed slaves.
Abraham Lincoln signed the
Compensated Emancipation Act in 1862, which ended slavery in the District of Columbia and freed about 3,100 enslaved persons, nine months prior to the
 In 1868, Congress granted the District's
African American male residents the right to vote in municipal elections.
Growth and redevelopment
By 1870, the District's population had grown 75% from the previous census to nearly 132,000 residents.
 Despite the city's growth, Washington still had dirt roads and lacked basic sanitation. Some members of Congress suggested moving the capital further west, but President
Ulysses S. Grant refused to consider such a proposal.
Congress passed the
Organic Act of 1871, which repealed the individual charters of the cities of Washington and Georgetown, and created a new territorial government for the whole District of Columbia.
 President Grant appointed
Alexander Robey Shepherd to the position of governor in 1873. Shepherd authorized large-scale projects that greatly modernized Washington, but ultimately bankrupted the District government. In 1874, Congress replaced the territorial government with an appointed three-member Board of Commissioners.
first motorized streetcars began service in 1888 and generated growth in areas of the District beyond the City of Washington's original boundaries. Washington's urban plan was expanded throughout the District in the following decades.
 Georgetown was formally annexed by the City of Washington in 1895.
 However, the city had poor housing conditions and strained public works. Washington was the first city in the nation to undergo
urban renewal projects as part of the "
City Beautiful movement" in the early 1900s.
Increased federal spending as a result of the
New Deal in the 1930s led to the construction of new government buildings, memorials, and museums in Washington.
World War II further increased government activity, adding to the number of federal employees in the capital;
 by 1950, the District's population reached its peak of 802,178 residents.
Civil rights and home rule era
Twenty-third Amendment to the United States Constitution was ratified in 1961, granting the District three votes in the
Electoral College for the election of president and vice president, but still no voting representation in Congress.
assassination of civil rights leader Dr. Martin Luther King, Jr., on April 4, 1968,
riots broke out in the District, primarily in the U Street, 14th Street, 7th Street, and H Street corridors, centers of black residential and commercial areas. The riots raged for three days until more than 13,600 federal troops stopped the violence. Many stores and other buildings were burned; rebuilding was not completed until the late 1990s.
In 1973, Congress enacted the
District of Columbia Home Rule Act, providing for an elected mayor and 13-member council for the District.
 In 1975,
Walter Washington became the first elected and first black mayor of the District.