Same-sex marriage is not illegal in the United States. It is legal in some states, but not in others. On the federal basis, it is legally recognized, except that for some purposes, the couple may have to reside in a state that recognizes their marriage. In states where same-sex marriage is not legal, it is not legal because of the state marriage statute or, in some cases, because of an amendment to the state constitution.