The United States faced serious financial instability in its formative years. Other issues also threatened the emerging nation. Indians, with support from British allies, continued to launch raids against frontier settlements. Western migrants fueled these conflicts and forced the confederation government to take a more active role in governing its frontier territories. Meanwhile Spain closed the port of New Orleans to U.S. trade as states struggled to regulate commerce within the nation and abroad. Another threat to American trade arose off the coast of North Africa, where Barbary pirates attacked U.S. merchant ships. Issues of trade and piracy required diplomacy with European powers, but diplomatic relations were plagued with uncertainty given America’s outstanding war debts and the relative weakness of the confederation government.