The history of the United States Army began in 1775. From its formation, the United States Army has been the primary land based portion of the United States Armed Forces. The Army's primary responsibility has been the fighting of land battles and military occupation. The Corps of Engineers has a major role in controlling rivers inside the United States. The Continental Army was founded in response to a need for professional soldiery in the American Revolutionary War in order to fight the invading British Army. The Army was quite small in peacetime down to the 1940s. In 1947, the Air Force became completely independent from the Army Air Forces. The Army was under the control of the War Department until 1947, and the Defense Department since then. The U.S. Army fought the War of 1812 (1812–15), American Civil War (1861–65), Spanish–American War (1898), World War I (1917–18), World War II (1941–45), Korean War (1950–53) and Vietnam War (1965–71). After the Cold War ended in 1991, the U.S. Army has focused on the Middle East, such as the 1991 Gulf War, and War in Iraq, and the War in Afghanistan.