in times of war, the coast guard or individual components of it can operate as a service of the department of the navy. this arrangement has a broad historical basis, as the coast guard has been involved in wars as diverse as the war of 1812, the mexican–american war, and the american civil war, in which the cutter "harriet lane" fired the first naval shots attempting to relieve besieged fort sumter. the last time the coast guard operated as a whole within the navy was in world war ii. more often, military and combat units within the coast guard will operate under navy or joint operational control while other coast guard units will remain under the department of homeland security.