The Mayflower Compact was the first piece of legislation written and enacted in the United States of America.