The first militia in Delaware was formed when Swedish settlers took up arms to defend Fort Christina (which was at the time a Swedish settlement) against Dutch invaders. During the American Revolutionary War, Delaware raised several units of militia in support of the Patriot side of the war. In the War of 1812, all of the Delaware volunteer units saw combat at Lewes, where they comprised the majority of force that drove off a British naval squadron seeking control of the Delaware River. Despite the federal government initially prohibiting volunteer units the Mexican–American War, a volunteer unit raised in Delaware would serve in the battles of Contreras, Cherubusco, Molino del Rey, and Chapultepec, losing so many men that the unit was nicknamed "The Bloody 11th." During the American Civil War, Delaware would raise multiple units in support of the Union cause. During the Spanish–American War, the 1st Delaware Volunteer Infantry was mustered into federal service but not deployed abroad. With the passage of the Militia Act of 1903, all state militia units were folded into the National Guard of the United States, largely turning the state militias from a state-funded and controlled force to a reserve component of the federal military.