The primary mission of the Department of the Navy is to protect the United States, as directed by the President or the Secretary of Defense, by the effective prosecution of war at sea including, with its Marine Corps component, the seizure or defense of advanced naval bases; to support, as required, the forces of all military departments of the United States; and to maintain freedom of the seas. The United States Navy was founded on October 13, 1775, when Congress enacted the first legislation creating the Continental Navy of the American Revolution. The Department of the Navy and the Office of Secretary of the Navy were established by act of April 30, 1798 (10 U. S. C. 5011, 5031). For 9 years prior to that date, by act of August 7, 1789 (1 Stat. 49), the conduct of naval affairs was under the Secretary of War. The National Security Act Amendments of 1949 provided that the Department of the Navy be a military department within the Department of Defense (63 Stat. 578).