you cannot file as married filing jointly if either spouse was a nonresident alien at any time during the tax year. However, nonresident aliens married to U.S. citizens or residents can choose to be treated as U.S. residents and file joint returns. For more information on these choices, refer to Nonresident Spouse Treated as a Resident.