The states of Maryland and Virginia donated land along the Potomac River to form the federal district; however, Congress returned the Virginia portion in 1846. The City of Washington, located east of the preexisting port of Georgetown, was founded in 1791 to serve as the new national capital. Congress consolidated the whole District under a single municipal government in 1871. The city and the U.S. state of Washington, which is on the country's Pacific coast, were both named in honor of George Washington.
An Algonquian-speaking people known as the Nacotchtank inhabited the area around the Anacostia River when the first Europeans arrived in the 17th century.However, Native American people had largely relocated from the area by the early 18th century.
In his "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, in an event known as the Pennsylvania Mutiny of 1783, a band of unpaid soldiers besieged Congress while its members were meeting in Philadelphia. The Pennsylvania government refused requests to forcibly disperse the protesters, which emphasized the need for the national government not to rely on any state for its own security.
Article One, Section Eight of the United States Constitution therefore 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 later became 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 16, 1790, Congress passed the Residence Act, which approved the creation of a national capital to be located on the Potomac River, the exact area to be selected by President George Washington. 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 (260 km2).
Two preexisting 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 Benjamin Banneker, surveyed the borders of the federal district and placed boundary stones at every mile point. Many of the stones are still standing.
A new "federal city" was then constructed on the north bank of the Potomac, to the east of the established settlement at Georgetown. On September 9, 1791, the three commissioners charged with 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 in use at that time. Congress held its first session in Washington on November 17, 1800.
Shortly after arriving in the new capital, Congress passed the Organic Act of 1801, which officially organized the District of Columbia 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 located 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, following the Battle of York. The Capitol, Treasury, and White House were burned and gutted during the attack. Most government buildings were quickly repaired, but the Capitol, which was at the time largely under construction, was not completed in its current form until 1868.
In the 1830s, the District's southern territory of Alexandria went into economic decline partly due to neglect by Congress. Alexandria was a major market in the American slave trade and residents feared that abolitionists in Congress would end slavery in the District, further depressing the economy. As a result, Alexandrians petitioned Virginia to take back the land it had donated to form the District; a process known as retrocession.
The state legislature 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 land donated by Maryland. Confirming the fears of pro-slavery Alexandrians, the Compromise of 1850 outlawed the slave trade in the District, though not slavery itself.
The outbreak of the American Civil War in 1861 led to notable growth in the District's population due to the expansion of the federal government and a large influx of freed slaves. President 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 Emancipation Proclamation. In 1868, Congress granted male African American residents of the District the right to vote in municipal elections.
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. The situation was so bad that 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 a created a new territorial government for the whole District of Columbia. President Grant appointed Alexander Robey Shepherd to the new position of governor in 1873. Shepherd authorized large-scale municipal projects, which greatly modernized the city. However, the governor spent three times the money that had been budgeted for capital improvements, which ultimately bankrupted the District. In 1874, Congress replaced the territorial government with an appointed three-member Board of Commissioners.
The city's first motorized streetcars began service in 1888 and spurred growth in areas of the District beyond the City of Washington's original boundaries. In 1895, Washington formally annexed Georgetown, which until then had maintained a nominal separate identity. With a consolidated government and the transformation of rural areas within the District into urban neighborhoods, the entire city eventually took the name Washington, D.C.
Increased federal spending as a result of New Deal legislation 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. The 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.
After the 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 over 13,600 federal troops managed to stop the violence. Many stores and other buildings were burned; rebuilding was not complete until the late 1990s.
In 1973, Congress enacted the District of Columbia Home Rule Act, providing for an elected mayor and city council for the District. In 1975, Walter Washington became the first elected and first black mayor of the District. On September 11, 2001, terrorists hijacked American Airlines Flight 77 and deliberately crashed the plane into the Pentagon in nearby Arlington, Virginia. United Airlines Flight 93, believed to be destined for Washington, D.C., crashed in Pennsylvania when passengers tried to recover control of the plane from hijackers.