The U.S. Navy traces its origins to the Continental Navy, which was established during the American Revolutionary War and was effectively disbanded as a separate entity shortly thereafter. After suffering significant loss of goods and personnel at the hands of the Barbary pirates from Algiers, the U.S. Congress passed the Naval Act of 1794 for the construction of six heavy frigates, the first ships of the U.S. Navy.