The Army of the Potomac was created in 1861 but was then only the size of a corps (relative to the size of Union armies later in the war). Its nucleus was called the Army of Northeastern Virginia, under Brig. Gen. Irvin McDowell, and it was the army that fought (and lost) the war's first major battle, the First Battle of Bull Run. The arrival in Washington, D.C., of Maj. Gen. George B. McClellan dramatically changed the makeup of that army. McClellan's original assignment was to command the Division of the Potomac, which included the Department of Northeast Virginia under McDowell and the Department of Washington under Brig. Gen. Joseph K. Mansfield. On July 26, 1861, the Department of the Shenandoah, commanded by Maj. Gen. Nathaniel P. Banks, was merged with McClellan's departments and on that day, McClellan formed the Army of the Potomac, which was composed of all military forces in the former Departments of Northeastern Virginia, Washington, Pennsylvania, and the Shenandoah. The men under Banks's command became an infantry division in the Army of the Potomac. The army started with four corps, but these were divided during the Peninsula Campaign to produce two more. After the Second Battle of Bull Run, the Army of the Potomac absorbed the units that had served under Maj. Gen. John Pope.