Four regiments usually formed a brigade, although as the number of men in many regiments became greatly reduced, especially later in the war, more than four were often assigned to a brigade. Occasionally, regiments would be transferred between brigades. Two to four brigades usually formed a division. Two to four divisions usually formed a corps. Two to four corps usually formed an army. Occasionally, a single corps might operate independently as if it were a small army. The Confederate States Army consisted of several field armies, named after their primary area of operation. The largest Confederate field army was the Army of Northern Virginia, whose surrender at Appomattox Courthouse in 1865 marked the end of major combat operations in the US Civil War.