The Coast Guard is officially part of the Department of Homeland Security, rather than the Department of Defense. But, it's considered part of the U.S. military because in times of war, the president can transfer its assets to the Navy.