If you are a resident alien because you met the “substantial presence test” and you cannot claim the Closer Connection exemption, you may still be treated as a non-resident alien under the Canada-U.S. tax treaty. You could be considered a non-resident alien if you are considered a resident of both the United States and Canada under each country’s tax laws, your permanent home is in Canada, and your personal and economic ties are closer to Canada than the United States.
To determine if the above exemption applies to you, contact any Revenue Canada income tax office or the International Taxation Office. Also contact the closest IRS office if you are in the United States.