Tax Return for Dual Status
You can be both a nonresident and a resident for U.S. tax purposes during the same tax year. This usually occurs in the year you arrive or depart from the United States. If so, you need to file a dual-status income tax return.
If you are a U.S. resident for tax purposes and need to establish your U.S. residency for the purpose of claiming a tax treaty benefit with a foreign country, refer to Certification of U.S. Residency for Tax Treaty Purposes.